PDA

View Full Version : Easy quick question


techgearfree
02-12-2005, 08:28 PM
Currently I have:

$query = "SELECT * FROM users WHERE ip = '$user_ip'";

how can I make is query where ip = '$user_ip'"; OR when something else is true.

So, whats the mysql/php command to have a query be able to have multiple conditions Example: I know you can do WHERE something != '$some' (where the column is not equal to the var.)

But, how do you do something like:

WHERE this is true OR where this is true. what is the command for or?

Brandoe85
02-12-2005, 10:37 PM
Or(||) is the command. $query = "SELECT * FROM users WHERE ip = '$user_ip' OR something = 'something'";