MySQL Forums
Forum List  »  Newbie

Another Complex Query
Posted by: Dustin Poage
Date: August 21, 2009 12:27PM

I have created a single table db that has 7 entries:

Id
no1
no2
no3
no4
no5
pb
date

I want to search all columns for all numbers and return the result. It is for the powerball and I am just a little lazy to go through lot of tickets and I want to use another table for analysis (a side project). What I am trying to do is something like this (I know this isn't correct):

SELECT * FROM tbl WHERE (no1=x OR no2=x OR no3=x...) AND (no1=y OR no2=y...)...;

I am really trying to find all numbers from a given string. Is this something that can be done with a single query or are there going to be multiple queries? I am open to other ways of doing this also and am using php with mysql.

Thanks in advance.

Dustin

Options: ReplyQuote


Subject
Written By
Posted
Another Complex Query
August 21, 2009 12:27PM
August 22, 2009 05:41PM
August 23, 2009 05:24AM
August 24, 2009 02:25AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.