mrherman Posted October 3, 2010 Share Posted October 3, 2010 Is this considered correct syntax? (...the || ?) $result = mysql_query ( $sql ) || die ( __line__ . "_myquery_" . mysql_error() ) ; I'm confused...I thought the || and the "or" were perfectly interchangeable, but I had a query that wouldn't work (using the ||), and when I finally replaced the || with "or," it seemed to work. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/215072-or-vs/ Share on other sites More sharing options...
Alex Posted October 3, 2010 Share Posted October 3, 2010 In that usage they're two different things. || won't work in that context. Quote Link to comment https://forums.phpfreaks.com/topic/215072-or-vs/#findComment-1118651 Share on other sites More sharing options...
salathe Posted October 3, 2010 Share Posted October 3, 2010 See http://php.net/operators.logical and in particular the very first paragraph (and the link mentioned at the end of it). Quote Link to comment https://forums.phpfreaks.com/topic/215072-or-vs/#findComment-1118660 Share on other sites More sharing options...
mrherman Posted October 3, 2010 Author Share Posted October 3, 2010 Thank very much. Quote Link to comment https://forums.phpfreaks.com/topic/215072-or-vs/#findComment-1118679 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.