Jump to content


Photo

MySQL Select Query


  • Please log in to reply
2 replies to this topic

#1 SharkBait

SharkBait
  • Members
  • PipPipPip
  • Advanced Member
  • 845 posts
  • LocationMetro Vancouver, BC

Posted 27 October 2005 - 09:02 PM

How would I set up my query for this?

I need to find the instances where ID is = 15, 16, 82, 143 and 283

SELECT * FROM blah WHERE ID in? or??

#2 ryanlwh

ryanlwh
  • Staff Alumni
  • Advanced Member
  • 511 posts

Posted 27 October 2005 - 09:24 PM

[!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']SELECT[/span] * FROM blah WHERE ID IN (15, 16, 82, 143, 283) [!--sql2--][/div][!--sql3--]
Please use EDIT * 100...
Please use
or [php] * 1000...

PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...

#3 SharkBait

SharkBait
  • Members
  • PipPipPip
  • Advanced Member
  • 845 posts
  • LocationMetro Vancouver, BC

Posted 27 October 2005 - 09:29 PM

[!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']SELECT[/span] * FROM blah WHERE ID IN (15, 16, 82, 143, 283) [!--sql2--][/div][!--sql3--]

View Post


Oh that is simple, I thought it was something like that, guess when I tested it I was typing something in wrong.

Thanks!






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users