It appears you have not registered with our community. To register please click here ...

Author Topic: MySQL: Column \'date\' in order clause is ambiguous  (Read 2503 times)

ctwjr

  • Super Moderator
  • Jr. Member
  • **
  • Posts: 72
  • Karma: +10/-0
    • View Profile
    • http://www.ftplive.com
    • Email
MySQL: Column \'date\' in order clause is ambiguous
« on: April 01, 2007, 04:00:36 PM »
I recently upgraded to MySQL 4.1 and on a page in my web site I am receiving a blank page with the following error messge:

Column \'date\' in order clause is ambiguous

What does this mean and how can I fix it?

dynaweb

  • <b>Canine Deamon</b>
  • Administrator
  • Sr. Member
  • *****
  • Posts: 493
  • Karma: +10/-0
  • Generic personal text here ...
    • MSN Messenger - danno_d_manno@yahoo.com
    • View Profile
    • DynaWeb Designs
    • Email
MySQL: Column \'date\' in order clause is ambiguous
« Reply #1 on: April 04, 2007, 01:16:35 PM »
This means that there more than one table in your SQL reference that has that field name.  For example, let\'s say you are referencing 2 tables.

Table1:
Fields: stereos, dvds, speakers

Table2:
Fileds: computers, keyboards, speakers

You can plainly see that the field names "speakers" exists in both tables.  They are not the same fields though and should be referenced like "Table1.speakers" or "Table2.speakers" to avoid ambiguity.

Most likely you have an "order" clause that references the replicated field name in your SQL syntax somewhere.  Find it and add the preferred "Tablename." to prefix it properly.
Those who cannot learn from history are doomed to repeat it. -- Linux learns.

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
314 Views
Last post August 13, 2005, 11:51:36 PM
by Linux News
0 Replies
937 Views
Last post September 30, 2005, 03:57:59 AM
by sianz99
0 Replies
202 Views
Last post December 24, 2005, 03:35:02 AM
by Linux News
1 Replies
1733 Views
Last post January 15, 2006, 01:42:32 AM
by dynaweb
0 Replies
1511 Views
Last post October 02, 2006, 08:32:01 AM
by dynaweb