You are here: Re: Multidimensional Array Question « All PHP « IT news, forums, messages
Re: Multidimensional Array Question

Posted by moosus on 09/21/06 22:05

MS

My problem is that I am on Ver3.23.37 of MySQL which like VIEWS doesn't
support UNION's

As well there is no primary key across these three tables.

Where I am at at the moment I am querying all three tables for their latest
10 entries and writing these to a table I have labeled as temporary.

This then allows me to run another select which will grab the latest 10 out
of the 30 originally selected

Cheers
moosus


in article TKmdnejctO7IGY3YUSdV9g@ptd.net, IchBin at weconsul@ptd.net wrote
on 20/9/06 9:59 AM:

> MS wrote:
>>>>> I would love to keep my sort in my SQL but I am grabbing data from 3
>> tables
>>>>> I am sorting the data in the query from each table eg.
>>
>> Not used this for years and then it was not in MySQL...
>>
>> But I think the Union Statement would do the job for you...
>>
>> http://dev.mysql.com/doc/refman/5.0/en/union.html
>>
>> Best Wishes
>> MS
>>
>> ----------------------------------------------------------------------------
>> ----
>> Join MyClubWeb.co.uk - The Home of Club Websites and Medium to Small
>> Businesses.
>> ----------------------------------------------------------------------------
>> ----
>
> Yes MS, you nailed it. This is what I thought at first and it would be
> the best/easiest way.
>
> After looking at the UNION statement out on the internet, have not used
> for a while, it seemed that I could only do a UNION of two tables. It
> really did not make sense to me. I swear in my past years in programming
> some where either in Oracle or Sybase..BlabBlabBlab I had done a UNION
> on like six or seven tables. I thought that was apart of the SQL ansii.
> Guess I figured I am getting old.
>
> I just looked at the right place and you are, 100% right.

 

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

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