jaymc Posted February 6, 2007 Share Posted February 6, 2007 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 More sharing options...
artacus Posted February 6, 2007 Share Posted February 6, 2007 No, but you could technically do the update in a subquery but I really don't see the point. It wouldn't speed things up any. Link to comment https://forums.phpfreaks.com/topic/37234-1-query-combining-update-select/#findComment-177909 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.