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! 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. 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). 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. Link to comment https://forums.phpfreaks.com/topic/215072-or-vs/#findComment-1118679 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.