Imaginary things

Post here if you need help with SQL.
Post Reply
User avatar
FrederickGeek8
Posts: 148
Joined: Wed Nov 30, 2011 10:31 pm

Imaginary things

Post by FrederickGeek8 »

I have a database that has three tables that I want to use. Here is my structure
[syntax=text]users
---user_id (2 entries)
---user_email (2 entries)

admins
---user_id (2 entries)
---user_alias (2 entries)

writers
---user_id (0 entries)
---user_alias (0 entries)[/syntax]

Basically all I want is to select everything from the user table and if the user is in the admin or the writer table, also select their alias. I've been trying different queries but I can't seem to get anything to work. All the queries I try return 0 rows.

I think it might involve joins and stuff like that but really what I want is to SELECT and GROUP BY even if null
Post Reply