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 Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
robert_gsfame Posted October 28, 2009 Author Share Posted October 28, 2009 thx Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.