I want to change different column values of a table in one query, is that possible?
I tried something like this (just a guess):
<?php
$q="UPDATE tab SET name='samit' WHERE id='1' && set name='anju' where id='4'";
$run=mysql_query($q);
if($run){
echo 'updated';
}
else{
echo 'update failed';
}
?>
It's not working. I can do this using a loop, but a loop will increase operation time.