Jump to content

lard

Members
  • Posts

    5
  • Joined

  • Last visited

lard's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Thanks for you help, but finally got it thanks to NogDog on webdeveloper.com, anyone interested can read both responses...http://www.webdeveloper.com/forum/showthread.php?300723
  2. It's then adding a join where my syntax is falling down though, as soon as I add the join in I get nothing...
  3. Thanks Foxy, that does appear to be what I need. I'm now struggling with the syntax to treat it as a single table for the purposes of a join. This is what I've got: SELECT * FROM _10003_catalogue as t1 JOIN details as t2 ON t1.id=t2.id This is what I'm aiming at: SELECT * FROM (_10003_catalogue UNION ALL _10004_catalogue) as t1 JOIN details as t2 ON t1.id=t2.id I've tried putting parentheses in various places, and leaving them out, and just can't get it to work!
  4. Thanks but I don't think you've understood what I'm after. I don't want to add one table to another permanently. They need to remain separate entities. What I'm aiming at is having check boxes to select which catalogues to include in the results, so which tables to include in the query.
  5. Is there a way to add two tables together but effectively underneath each other? So user 1 has a catalogue, as does user 2. The table structure is identical. There is a join from the user table to a details table. I effectively want to stack user 1 table on top of user 2 table and then join the whole lot with the details table. Each of the users will have some duplicate values - so user1 table and user2 table could both need to join together with the same entry of the details table. Does that make sense.....? CURRENTLY:SELECT *FROM user1catalogue as t1JOIN details as t2ON t1.id=t2.idetcAIMING AT SOMETHING LIKE THIS:SELECT *FROM user1catalogue AND user2catalogue as t1JOIN details as t2ON t1.id=t2.idetc
×
×
  • Create New...