What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » mysql turning csv into OR :P

mysql turning csv into OR :P
Author: Message:
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
35 / Male / Flag
Joined: Mar 2004
O.P. mysql turning csv into OR :P
Ok well, Im using a sub query which returns some numbers separated by commas and i want mysql to treat those like an OR statement, at the moment everything seems to work except it only returns one result :( instead of many rows

The query

code:
SELECT logMessage FROM `scripts_info` WHERE revision = (SELECT revisions FROM `scripts_log` WHERE path="/test")


The sub query will return "5,6"
and in the table log message there are two rows, the first row revision column is set to 5 and the other to 6
the current query only returns the first one with the revision 5 when it should really return both rows :(

help? :P
[Image: dt2.0v2.png]      Happy Birthday, WDZ
07-11-2007 04:35 AM
Profile PM Web Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: mysql turning csv into OR :P
I can't test this at my PC because I don't have a local host nor MySQL installed (yet) and I'm losing my MySQL knowledge as I'm not able to make use of it, but maybe the reference might help? After a quick look, it seems like the IN statement might do this?

This post was edited on 07-11-2007 at 06:36 AM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
07-11-2007 06:35 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On