Jump to content

Adding loop in mysql query


sungpeng

Recommended Posts

No, but you can

$idlist = join(',', $testlist)
mysql_query("update pupils set record='running' where pid NOT IN ($idlist)");

so the query looks like this, for example

update pupils set record='running' where pid NOT IN (1,5,9,18)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.