Copy link to clipboard
Copied
Hi, I'm develoing a simple cms system and I cant import two tables to one recordset and make it work.
I want to import two tables 1.users 2.pages. I can easily import the "pages" table and show it as i desire. The problem is that I also need to do authentication and to do that i need to import the user table to include user privileges and so. If include two tables in my recordset it throws no errors but I doesnt display pages nor the users.
p.s Everything I described is based on dremawever built in functions.
Copy link to clipboard
Copied
In order to return rows from two tables in one recordset there should be a relationship between the tables. Sometimes the relationship is stored in a third table.
If there is a relationship, then there are lots of ways to combine the two, depending on the result you are looking for. the simplest method is like this:
SELECT pagefield1, pagefield2, userfield1, userfield2 FROM pages, users WHERE pages.userid = users.userid
. . .but it sounds to me like there is not a relationship between the tables, in which case you would simply have two recordsets based on two calls to the database.
I don't know anything about Dreamweaver built-n functions, but the above may point you in the right direction.