Ordering a multi-select query

Hi,

Here is my problem. I have created a custom messageboard with a single table for each forum. On the main page, I'd like to display something like : "Latest posts" and it would list, say the last 10 posts that have been made on the site.

So I thought of selecting all the forums' tables and then ordering the select by the PostDate column present in every table.

I however have no clue how to do it...

Any help greatly apreciated.

Thanks in advance,

Francois.

Comments

  • check out the UNION keyword
  • : check out the UNION keyword
    :


    I checked it out but my hosting compagny isn't running MySQL 4.0 so I couldn't use that but you let me to finding the MERGE function whihc I used and now it works fine.

    Thank you very very much :)

    Francois.
  • : I checked it out but my hosting compagny isn't running MySQL 4.0 so I couldn't use that but you let me to finding the MERGE function whihc I used and now it works fine.

    UNION is, as far as I know, part of standard SQL.
  • : UNION is, as far as I know, part of standard SQL.

    That's possible but the MySQL website say that : "UNION is implemented in MySQL 4.0.0."

    Cause I tried union and I messages saying that I was trying to do something unsupported... After searching a little on the web I found other users that were experiencing the same problems as I did...

    Does using a MERGE table insted of UNION bad for performances or increases the load on the server?
  • : Does using a MERGE table insted of UNION bad for performances or increases the load on the server?

    I'm not even familiar with MERGE so I couldn't say.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories