robert_gsfame Posted October 28, 2009 Share Posted October 28, 2009 This might be a stupid simple question, but i need your answer If i execute the UPDATE query but there is no record like what i ask...let say $query="UPDATE $table SET column1='A' WHERE column2='Mine'"; $myquery=mysql_query($query); But let say there is no record like WHERE column2='Mine' Then what will happen, will this cause me an error or not?? thx in advance Link to comment https://forums.phpfreaks.com/topic/179297-solved-update-basic-questions/ Share on other sites More sharing options...
seanlim Posted October 28, 2009 Share Posted October 28, 2009 There won't be an error if there are no matches. mysql_affected_rows() will just return 0 Link to comment https://forums.phpfreaks.com/topic/179297-solved-update-basic-questions/#findComment-945993 Share on other sites More sharing options...
robert_gsfame Posted October 28, 2009 Author Share Posted October 28, 2009 thx Link to comment https://forums.phpfreaks.com/topic/179297-solved-update-basic-questions/#findComment-945994 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.