Changing Multiple values in MySQL with a single Query
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';
}
?>
its not working.. i can do this using LOOP, but loop will increase
operation time..
please let me know some other method.
thank regards
No comments:
Post a Comment