Re: [PHP] Question on SELECT

2003-06-13 Thread Leif K-Brooks
$query = 'select * from table where fieldname in(\''. implode('\',\'',$myArray) . '\')'; Roy W wrote: I have a bunch of variables stuffed in myArray() I want to run a MySQL SELECT statement ($query=" ..") where it will access only those records in the database "WHERE" table.fieldname is fou

[PHP] Question on SELECT

2003-06-13 Thread Roy W
I have a bunch of variables stuffed in myArray() I want to run a MySQL SELECT statement ($query=" ..") where it will access only those records in the database "WHERE" table.fieldname is found in myArray Is there a simple one liner? Or do I have to "loop" it through (kinda nasty as you can