Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

SQL assistance

Name: Anonymous 2006-12-01 12:36

Working on a MySQL database for a newspaper so they can keep track of advertisers.

SELECT advertisers.name, advertisements.enddate, advertisements.startdate, advertisements.section, advertisements.description, advertisments.rate, advertisements.total, advertisements.archive, advertisements.comments, advertisements.size FROM advertisements, advertisers, addates, issues INNER JOIN addates ON issues.issue = addates.issue, INNER JOIN addates ON advertisements.archive = addates.archive, INNER JOIN advertisements ON advertisers.account = advertisements.account ORDER BY issues.date;

Returns not unique table/alias 'addates'. There are no fields in any table named 'addates'. Tried qualifying with dbname.table, and using `'s. Same error.

Name: Anonymous 2006-12-01 14:14

>>1

problems include
- you put all the tables you wanted to join in the from clause, effectively cross joining them
- you joined addates where you should have joined issues
- commas where not allowed

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List