Not unique table/alias: 'q'

This is a discussion on "Not unique table/alias: 'q'" within the Databases section. This forum, and the thread "Not unique table/alias: 'q' are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Databases

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Feb 5th, 2006, 08:56
Up'n'Coming Member
Join Date: Jan 2006
Location: East Sussex
Age: 26
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Question Not unique table/alias: 'q'

Can anyone tell me why im getting this error;

Not unique table/alias: 'q'

When running the following query;

DELETE q.*, r.* FROM questions AS q, replies AS r WHERE r.id_question = q.question_id AND q.question_id = 55

When were alias's first done be mysql as i've just discovered that my provider are running version 4.0.25

Thanks for any help

Gareth
Reply With Quote

  #2 (permalink)  
Old Feb 5th, 2006, 10:05
Junior Member
Join Date: Feb 2006
Age: 40
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Not unique table/alias: 'q'

Not sure if this is the reason. From MYSQL

Quote:
Note: In MySQL 4.0, you should refer to the table names to be deleted with the true table name. In MySQL 4.1, you must use the alias (if one was given) when referring to a table name:
In MySQL 4.0:
DELETE test FROM test AS t1, test2 WHERE ...
In MySQL 4.1:
DELETE t1 FROM test AS t1, test2 WHERE ...
I use aliases for selects in 4.0.25 but have not used them for a delete.
Reply With Quote
Reply

Tags
unique, tablealias

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
unique Clothings yaodong Free Web Site Critique 4 Mar 17th, 2007 16:45
mysql resource: Unique? Compumaniac12 Databases 1 Sep 1st, 2006 21:05
Unique Web Design Opportunity supastarz Job Opportunities 0 Aug 8th, 2006 15:12
Domain alias redirection with PHP? Tim356 PHP Forum 2 Dec 12th, 2005 03:26


All times are GMT. The time now is 01:27.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43