In message <[EMAIL PROTECTED]>, Mark
Wheeler <[EMAIL PROTECTED]> writes
>Hi all,
>
>I've got a query I can't seem to figure out how to write. Here's the  
>table structure:
>
>price_1X, price_2X, price_3X, price_4X, price_1Y, price_2_Y,  
>price_3Y, price_4Y
>
>There are 200 to 300 entries in this table. The price_1X needs to be  
>compared to price_1Y, price_2X to price_2Y, etc. Think of it as a  
>price comparison between two different companies. As well, some of  
>the fields may be empty.
>
>What I'm trying to do is find the lowest price in each entry, then  
>sort all the entries by that lowest price. Does anyone have an idea  
>of how to do this?

Your database is not designed correctly. 

The items should be in one table, the prices in another.  That way,
there are no problems for you.

-- 
Pete Clark

Free advertising for your website, business, or organisation at:
http://www.hotcosta.com/resources.php




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/CefplB/TM
--------------------------------------------------------------------~-> 

The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to