iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > Putting it Together > Databases

Reply
 
LinkBack Thread Tools
Old February 5th, 2006, 05:56 AM   #1
WebForumz Member
 

Join Date: Jan 2006
Location: East Sussex
Age: 28
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Gee Bee is on a distinguished road
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
Gee Bee is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 5th, 2006, 07:05 AM   #2
New Member
 

Join Date: Feb 2006
Age: 41
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Ward is on a distinguished road
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.
Ward is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
unique , tablealias


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Full Website Reviews 4 March 17th, 2007 02:45 PM
mysql resource: Unique? Compumaniac12 Databases 1 September 1st, 2006 06:05 PM
Domain alias redirection with PHP? Tim356 PHP 2 December 12th, 2005 12:26 AM


Search Engine Optimization by vBSEO 3.2.0 RC8