Jump to content

1 Query combining update & select


jaymc

Recommended Posts

Would it be possible to turn this into one query

 

$queryupdate = "UPDATE `blte_online` SET `rtime` = '$timestamp' WHERE `usr_name` = '$User_Session' LIMIT 1";

$query='SELECT * FROM '.$prefix."_online WHERE ($timestamp-rtime)<20 ORDER BY `group` DESC, `gen` ASC, `usr_name` ASC";

$result=mysql_query($query);

 

In otherwords, can you perform UPDATE and SELECT and have it executed in one query..

Link to comment
https://forums.phpfreaks.com/topic/37234-1-query-combining-update-select/
Share on other sites

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.