Lost Password?


Go Back   CodeCall Programming Forum > Web Development Forum > Database & Database Programming

Database & Database Programming MySQL, Oracle, SQL, PL/SQL, ABAP, Smart Forms, and other databases and languages. A database is an organized body of related information used in many websites (including CC).

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-28-2007, 04:41 PM
Crane's Avatar   
Crane Crane is offline
Programming Expert
 
Join Date: Nov 2005
Posts: 399
Rep Power: 14
Crane is on a distinguished road
Default MySQL Error: #1052 - Column 'id' in field list is ambiguous

MySQL Error: #1052 - Column 'id' in field list is ambiguous

I get this when I post the SQL into phpMyAdmin. I guess I don't really know what the word ambiguous means. Can anyone tell me what is the problem?

sql Code:
  1. SELECT id, title
  2. FROM td AS a
  3. INNER JOIN post AS cc ON cc.id = a.id
  4. WHERE a.plt IN('79');
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 09-29-2007, 02:39 AM
v0id's Avatar   
v0id v0id is online now
Retired
 
Join Date: Apr 2007
Location: Denmark
Posts: 2,630
Last Blog:
CherryPy(thon)
Rep Power: 28
v0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of light
Send a message via MSN to v0id
Default

SQLZOO, Error 1052 Column 'name' in field list is ambiguous

This will maybe help you out.
__________________
05-03-2007 - 11-13-2008
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-30-2007, 10:16 AM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 9,224
Last Blog:
Ext JS or Ext GWT
Rep Power: 20
Jordan is just really niceJordan is just really niceJordan is just really niceJordan is just really nice
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

It means that ID and/or Title exist in both tables - which one do you want to select? Rewrite it like so in order to fix the problem:

mysql Code:
  1. SELECT a.id, cc.title
  2.       FROM td AS a
  3.       INNER JOIN post AS cc ON cc.id = a.id
  4.       WHERE a.plt IN('79');
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
List of Values in Column Chan PHP Forum 6 08-16-2007 07:37 AM
MYSQL CheatSheet - A must for MySQL Users reachpradeep Database & Database Programming 1 03-03-2007 04:05 PM
MySQL Resources dirkfirst Database & Database Programming 1 05-25-2006 03:31 AM


All times are GMT -5. The time now is 11:29 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 97%

Ads