zirgs Posted July 17, 2006 Share Posted July 17, 2006 Hi.I have very simple question about mysql ...can someone tell me function that checks if query was successfull?or just use somth like that?[code]if (!$query){echo "Not good ;(";})[/code] Link to comment https://forums.phpfreaks.com/topic/14878-check-successfull-query/ Share on other sites More sharing options...
redarrow Posted July 17, 2006 Share Posted July 17, 2006 if($record['name'] >0) {echo" entry there";}else {echo " no entry";} Link to comment https://forums.phpfreaks.com/topic/14878-check-successfull-query/#findComment-59582 Share on other sites More sharing options...
toplay Posted July 17, 2006 Share Posted July 17, 2006 See the "MySQL Data Retrieval" section in the FAQ page:http://www.phpfreaks.com/forums/index.php/topic,31047.msg153359.html#msg153359 Link to comment https://forums.phpfreaks.com/topic/14878-check-successfull-query/#findComment-59583 Share on other sites More sharing options...
zirgs Posted July 17, 2006 Author Share Posted July 17, 2006 thank you ;) Link to comment https://forums.phpfreaks.com/topic/14878-check-successfull-query/#findComment-59614 Share on other sites More sharing options...
effigy Posted July 17, 2006 Share Posted July 17, 2006 Ideally, you [i]always[/i] want to check the status of your queries. If you're doing this a lot, rather than repeating the code, extend the mysqli class. There is some introductory material [url=http://www.zend.com/php5/articles/php5-mysqli2.php#Heading5]here[/url]. Link to comment https://forums.phpfreaks.com/topic/14878-check-successfull-query/#findComment-59617 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.