You are here: Re: mysql query « PHP SQL « IT news, forums, messages
Re: mysql query

Posted by Bandul on 04/26/06 12:41

Thanks for tip.:-)
See ya
"strawberry" <zac.carey@gmail.com> wrote in message
news:1145997588.139014.173090@g10g2000cwb.googlegroups.com...
>I think it's right, however, if someone buys the same book twice, the
> title will show up twice in this result. You would need to modify the
> query like this...
>
> SELECT title
> FROM orders, customers, order_items
> LEFT JOIN books ON books.isbn = order_items.isbn
> WHERE orders.customerid = customers.customerid
> AND order_items.orderid = orders.orderid
> AND customers.name = 'John'
> GROUP BY title
> LIMIT 0 , 30
>
> Incidentally, to solve this kind of thing yourself, just build up the
> query slowly, bit by bit. Begin with something like;
>
> SELECT * FROM orders,customers;
>
> and see where it gets you
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация