Howdy, Stranger!

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

Categories

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

  • infidelinfidel Member Posts: 2,900
    check out the UNION keyword
  • ddcarnageddcarnage Member Posts: 3
    : 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.
  • infidelinfidel Member Posts: 2,900
    : 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.
  • ddcarnageddcarnage Member Posts: 3
    : 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?
  • infidelinfidel Member Posts: 2,900
    : 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.
  • Shawn CarterShawn Carter Member Posts: 0

    __ \ http://forcoder.org \ free ebooks and video tutorials about || Ruby, Perl, C#, MATLAB, PHP, C++, Python, Visual Basic, PL/SQL, JavaScript, C, Scratch, Visual Basic .NET, Java, Swift, Go, Assembly, Delphi, R, Objective-C Crystal, Scala, Clojure, LabVIEW, D, Fortran, Julia, Kotlin, Hack, FoxPro, Prolog, F#, VBScript, Apex, Scheme, Alice, Ada, Erlang, COBOL, Lua, Awk, Lisp, Bash, Transact-SQL, Logo, Dart, ABAP, SAS, ML, Rust || __________

Sign In or Register to comment.