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] Quote 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";} Quote 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 Quote 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 ;) Quote 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]. Quote Link to comment https://forums.phpfreaks.com/topic/14878-check-successfull-query/#findComment-59617 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.