arrays in WHERE

wxdqz

New Member
After extensive testing I've found that arrays don't work in a query string. :(
I am thankful for any help, here's my code;

for ($i=0; $i<=3; $i++)$sql = "UPDATE likvid SET DEPOT=\"$depot\", BOKARE='$anvcookie', NAMN='$namn', DATUM='$olddate', BANK='$bank[0]', KRONOR=\"$kronor[0]\", KONTO='$konto[0]', TELEFON='$ring[0]', KOMMENTAR='$kommentar[0]', KONTROLL='TOM', KONTROLLDATUM='TOM' WHERE ID=$idnummer[$i]";
$result = mysql_query($sql,$db);

For example is $kommentar[0] a name of a field and does work when I use the exact ID. I have tried using ID=\"$idnummer[$i]\""; wont work either.

Thankful for any suggestions!
 
Back
Top