Liquid Fire Posted February 23, 2007 Share Posted February 23, 2007 when i run an update query like: $query = "UPDATE messages SET message = '{$new_message}', style_class = '{$style_class}' WHERE id = '{$message_id}'"; what is the return value of he mysql_query($query) if it was completed correctly, if was was not completed correctly? Link to comment https://forums.phpfreaks.com/topic/39824-return-value-when-running-a-upodate-query/ Share on other sites More sharing options...
paul2463 Posted February 23, 2007 Share Posted February 23, 2007 you would request an error statement in the event of a failure, other wise it worked <?php $query = "UPDATE messages SET message = '$new_message', style_class = '$style_class' WHERE id = '$message_id'"; mysql_query($query) or die('Invalid query: ' . mysql_error()); ?> edit: curly braces around the variables are not required any more Link to comment https://forums.phpfreaks.com/topic/39824-return-value-when-running-a-upodate-query/#findComment-192380 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.