nobodyk Posted August 16, 2010 Share Posted August 16, 2010 Can I use limits? Since I'm ust trying to update one row, I don't see why mysql needs to keep searching for new matching rows. Here's my query: $update_s = "UPDATE sessions SET date = NOW() WHERE sec = '$secid' AND user = '$dID'"; I tried putting LIMIT = 1 at the end of the query, but I get an error. Link to comment https://forums.phpfreaks.com/topic/210833-quick-question-about-mysql-update/ Share on other sites More sharing options...
trq Posted August 16, 2010 Share Posted August 16, 2010 I tried putting LIMIT = 1 at the end of the query, but I get an error. Because the syntax is LIMIT 1, no equals sign. Link to comment https://forums.phpfreaks.com/topic/210833-quick-question-about-mysql-update/#findComment-1099741 Share on other sites More sharing options...
nobodyk Posted August 16, 2010 Author Share Posted August 16, 2010 lol I feel stupid now. Link to comment https://forums.phpfreaks.com/topic/210833-quick-question-about-mysql-update/#findComment-1099744 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.