Re: need help to build a query

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

 



On 10/9/06, afan@xxxxxxxx <afan@xxxxxxxx> wrote:
but I know there must be much better solution then this one.

You're right: Simply JOIN your queries...

SELECT order_id, order_date, order_status, file_name
   FROM orders
   JOIN uploaded_files AS uf ON orders.order_id = uf.order_id
   ORDER BY orders.order_id DESC
   LIMIT 100

HTH,
John W



thanks for any help.

-afan

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



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