jd2007 Posted July 18, 2007 Share Posted July 18, 2007 how do i check if a mysql query sent was succesful or not ?...tq... Link to comment https://forums.phpfreaks.com/topic/60490-how-do-i-check-if-a-mysql-query-sent-was-succesful-or-not/ Share on other sites More sharing options...
cooldude832 Posted July 18, 2007 Share Posted July 18, 2007 what kinda of query and what kinda response? (insert, delete, truncate, select? Link to comment https://forums.phpfreaks.com/topic/60490-how-do-i-check-if-a-mysql-query-sent-was-succesful-or-not/#findComment-300896 Share on other sites More sharing options...
pocobueno1388 Posted July 18, 2007 Share Posted July 18, 2007 It should be the same for all queries. <?php $sql = "UPDATE table SET col = '$var' WHERE condition"; $query = mysql_query($sql); if ($query){ echo "Query was successful"; } else { echo "Query Failed."; } ?> Link to comment https://forums.phpfreaks.com/topic/60490-how-do-i-check-if-a-mysql-query-sent-was-succesful-or-not/#findComment-300897 Share on other sites More sharing options...
jd2007 Posted July 18, 2007 Author Share Posted July 18, 2007 thanks... Link to comment https://forums.phpfreaks.com/topic/60490-how-do-i-check-if-a-mysql-query-sent-was-succesful-or-not/#findComment-300939 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.