Original Post
An old rushed design descission, on a forum I run, was to seperate different forums into different tables and just read them seperately. These days around I've realised how insanely stupid that was and I'm looking to join the 3 tables into one. I've been fidling with MySQL the last couple of hours trying to get it to work, since I'm positive there must be a simpler way to do it than parsing it all through PHP. So far I've just been trying to SELECT everything, getting it to work proberly. After starting with "SELECT * FROM 03_forum, 04_forum", which didn't work, I stumpled upon this, which seems to be what I'm looking for. Unfortunately I'm a SQL newbie, can't make sence of the documentation, and need some help from you good people. So far I've got: "SELECT * FROM 03_forum JOIN 04_forum" - This produces the same result as above: all the data in one sheet, but instead of just adding all the rows, it's just created 7 new fields and added the results with same IDs together and dublicated where nescessary. Then I fell in love with NATURAL JOIN which seems to do a task akin to what I need: "SELECT 03_forum NATURAL JOIN 04_forum" - This returns nothing. I figure I need to add the USING part, but everytime I do this, MySQL complains about syntax errors: "SELECT * FROM 03_forum NATURAL JOIN 04_forum USING bruger" - Gives me this:
Quote:Any insights?
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM 03_forum JOIN 04_forum USING bruger