terrani
asked on
PHP multiple update query
Hello,
I am trying to update multiple rows with sql query.
while($data = mysql_fetch_array($_data)) {
"update timedone set time=$time where pid = $data[pid]";
}
whenever i execute this query in PHP, it displays "page cannot be displayed";
How do I solve this issue???
Thank you.
I am trying to update multiple rows with sql query.
while($data = mysql_fetch_array($_data))
"update timedone set time=$time where pid = $data[pid]";
}
whenever i execute this query in PHP, it displays "page cannot be displayed";
How do I solve this issue???
Thank you.
ASKER
angelIII // thank you.
um..but what is difference between mysql_query and mysql_execute ?
php.net shows "Note: mysqli_execute() is deprecated and will be removed. ";
can I use it???
um..but what is difference between mysql_query and mysql_execute ?
php.net shows "Note: mysqli_execute() is deprecated and will be removed. ";
can I use it???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
angelIII// thank you.
but..how does it help? I understand that mysql_fetch_assoc is faster than mysql_fetch_array, but does it make big difference???
but..how does it help? I understand that mysql_fetch_assoc is faster than mysql_fetch_array, but does it make big difference???
looks like this got through the nets ..
>I understand that mysql_fetch_assoc is faster than mysql_fetch_array, but does it make big difference???
no. but being efficient in all the details is just good practise
>but..how does it help?
I used the correct mysql_query function, and in the query:
`pid` = {$data['pid']} ";
is what will make the difference compared to:
pid = $data[pid]";
>I understand that mysql_fetch_assoc is faster than mysql_fetch_array, but does it make big difference???
no. but being efficient in all the details is just good practise
>but..how does it help?
I used the correct mysql_query function, and in the query:
`pid` = {$data['pid']} ";
is what will make the difference compared to:
pid = $data[pid]";
while($data = mysql_fetch_assoc($_data))
{
mysql_execute("update `timedone` set `time`= '$time' where `pid` = {$data['pid']} ";
}