Selecting Rows Based on Row Values Being in Array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello All,

I'm attempting to return rows from a mysql DB based on this criteria:

I have a list, in the form of an array that I need to compare against each 
row
in the table.  Where theres a match I need that entire row returned.

e.g.    $varListof 3outOf_10Fields = array(6blue40lbs, 7orange50lbs, 
8orange60lbs, 9purple70lbs);

The array contains 3 of the db row fields in 1 value. However there are 10 
fields/columns in the table.

===============
what table looks like  |
===============
                  size       color    weight
ROW 1    | value1 | value1 | value1 | value1 | value1 | value1 |

So how could I set up a query that would SELECT the entire row, if the row 
contained $varListof 3outOf_10Fields[1].

Open to any suggestions or work arounds.  I'm playing with extract() but 
code is too crude to even post.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux