Re: Selecting Rows Based on Row Values Being in Array

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

 



I don't even being to understand your question, but it's a MySQL
question anyway.

http://dev.mysql.com/

On Sat, June 30, 2007 12:18 am, kvigor wrote:
> 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
>
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
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