Jump to content

[SOLVED] SELECTing from a JOINed table.


Bakes

Recommended Posts

SELECT user.data1, user.data2, subgroup.name 
  JOIN subgroup ON
  (subgroup.id = user.subgroup) 
  JOIN group ON
  (group.id = subgroup.group)
WHERE user.level = 30 AND group.rank = 20

 

gives me error #1064.

I know the problem is that I am querying a joined table, but I am unsure how to fix it, so thought I'd post here.

Can anyone show me what my problem is?

Link to comment
Share on other sites

sorry, I didn't say that I renamed the tables, because the guy who i'm doing this for wants me to release as little as possible (I've done this, for the most part, in Python, but I'm having some trouble with the web interface, and the SQL.)

 

it's actually something more along the lines of pho34_ugroup

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.