Jump to content

or statement in mysql_query


topflight

Recommended Posts

I am trying to write a mysql query that will get either information take a look

 

$opm2 = mysql_query("SELECT * FROM `o` WHERE id='$id' AND a='AL OR a=EG'");

 

When I run that query it gets the wrong information, it dosen't even get the ID, it get some random ID.

 

The main question is how do you write an OR statement in a mysql_query

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/208359-or-statement-in-mysql_query/
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.