Jump to content

"or" vs "||"


mrherman

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.