Reply to Re: Best Way to Combine Results from 2 mySQL Searches, into One Sorted List?

Your name:

Reply:


Posted by ZeldorBlat on 08/21/07 00:29

On Aug 20, 5:32 pm, Vik Rubenfeld <v...@mindspring.com.invalid> wrote:
> I have to search 2 mySQL tables, and show the user a single sorted list
> that contains all the results from both mySQL queries.
>
> My question is, how do you get all the resulting items from both
> databases into one single, sorted list, to present to the user?
>
> I guess one way would be, to use PHP to copy all the results from each
> database, into a PHP array, and then sort it. Is that how this kind of
> thing is usually done?
>
> Thanks in advance to all for any info.

Use union:

<http://dev.mysql.com/doc/refman/5.0/en/union.html>

[Back to original 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

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