Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Recordset form different tables

Explorer ,
Apr 17, 2011 Apr 17, 2011

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.

TOPICS
Server side applications

Views

521
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 17, 2011 Apr 17, 2011

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines