Jump to content

an AND in my WHERE


PHP Nubsauce

Recommended Posts

Hey Guys,

 

I always refer to php and sql manuals for easy answers - but this one i can't seem to find fast enough. Can you tell me how to write this script?

 

I've tried

 

$links = @mysql_query("SELECT * FROM ".$mysql_pretext."_users WHERE ID = '1' AND '2'");

 

as well as

 

$links = @mysql_query("SELECT * FROM ".$mysql_pretext."_users WHERE ID = '1 AND 2'");

 

and neither worked.

 

 

Any suggestions? I'm trying to pull only the users with ID 1 and 2

 

Thanks

 

Nubsauce

Link to comment
https://forums.phpfreaks.com/topic/116241-an-and-in-my-where/
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.