kigroy Posted December 16, 2008 Share Posted December 16, 2008 What do call the exclamation point in the following code: if (!$result) { $message = 'Invalid query: ' . mysql_error() . "\n"; $message .= 'Whole query: ' . $query; die($message); } I don't know what it's called so I can't look it up at php.net. ??? Thanks... Link to comment https://forums.phpfreaks.com/topic/137153-solved-what-does-this-mean-result/ Share on other sites More sharing options...
mmarif4u Posted December 16, 2008 Share Posted December 16, 2008 It represent NOT. Link to comment https://forums.phpfreaks.com/topic/137153-solved-what-does-this-mean-result/#findComment-716439 Share on other sites More sharing options...
xtopolis Posted December 16, 2008 Share Posted December 16, 2008 $result is referring to the outcome of $result = mysql_query($sql); If the query works, it returns with a resource id pointer (equivalent to TRUE), and if it fails it returns FALSE. That code says: if("if NOT TRUE // if equivalent of FALSE") { //show the query debug errors } Link to comment https://forums.phpfreaks.com/topic/137153-solved-what-does-this-mean-result/#findComment-716445 Share on other sites More sharing options...
kigroy Posted December 16, 2008 Author Share Posted December 16, 2008 thanks to both of you! very helpful. Link to comment https://forums.phpfreaks.com/topic/137153-solved-what-does-this-mean-result/#findComment-716446 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.