Lost Password?

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

Vote on your favorite hash algorithm here!

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, 03:41 PM
Crane's Avatar   
Crane Crane is offline
Programming Expert
 
Join Date: Nov 2005
Posts: 399
Credits: 1
Rep Power: 13
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, 01:39 AM
v0id's Avatar   
v0id v0id is offline
Super Moderator
 
Join Date: Apr 2007
Location: Denmark
Posts: 2,578
Last Blog:
CherryPy(thon)
Credits: 55
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-30-2007, 09:16 AM
Jordan's Avatar   
Jordan Jordan is online now
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 7,364
Last Blog:
Tramp Variables
Credits: 1
Rep Power: 20
Jordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud of
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
Don't hesitate to ask any questions that you have! Check out our ASCII Calculator!
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

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


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

Contest Stats

Xav ........ 1335.07
MeTh0Dz|Reb0rn ........ 1059.99
morefood2001 ........ 898.18
John ........ 887.37
marwex89 ........ 875.28
WingedPanther ........ 864.22
Brandon W ........ 764.23
chili5 ........ 312.39
Steve.L ........ 256.16
dcs ........ 231.11

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 83%

Ads