Charlie Schaubmair schreef:
Hello,
I want to do a query where I only gt the results by an numeric value:
select * from MyTable where 1 IN someFieldInMyTable
I know this query doesn't work, but maybe anyone knows what I mean.
1 can be a value betwenn 1 and 23
someFieldInMyTable is normaly a list like: 1,2,3,4,5,6,9,21
br
Charlie
Hey
try:
SELECT * FROM MyTable WHERE someFieldInMyTable='%1%'
This will also give you results like 21
What I usally do in these cases is build the values like this:
[1][2][3][21]
And then te query:
SELECT * FROM MyTable WHERE someFieldInMyTable='%[1]%'
Mike
--
Medusa, Media Usage Advice B.V.
Science Park Eindhoven 5216
5692 EG SON
tel: 040-24 57 024
fax: 040-29 63 567
url: www.medusa.nl
mail: [EMAIL PROTECTED]
Uw bedrijf voor Multimedia op Maat
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]