Jump to content


Photo

OR statement


  • Please log in to reply
2 replies to this topic

#1 hawaii233

hawaii233
  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 22 October 2005 - 04:44 PM

hi,

I want to ask if it is possible to make the following statement:

SELCET * FROM WHERE xyz AND wer OR mnb 

So generally I want to have if xyz and wer are true it takes these and otherwise it takes the mnb after the OR part. I hope I made somehow clear what I mean?

Further I wanted to ask I gonna have a table with two ID's, both primary keys like
1 2
1 3
1 4
2 2
2 3

This table might have about 60.000-70.000 entries, is that possible or are there constraints regarding waiting time?

thks for the help...

#2 neylitalo

neylitalo
  • Staff Alumni
  • Advanced Member
  • 1,854 posts
  • LocationMichigan, USA

Posted 22 October 2005 - 04:53 PM

[!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']SELECT[/span] * FROM `table_name` WHERE (xyz AND wer) OR mnb [!--sql2--][/div][!--sql3--]
http://nealylitalo.net - My personal website, and home of The Netizen's Journal.

#3 hawaii233

hawaii233
  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 22 October 2005 - 06:18 PM

Works perfectly, thanks neylitalo!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users