LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-22-2006, 03:22 AM   #1
rajnair0278
Member
 
Registered: Mar 2006
Posts: 62

Rep: Reputation: 15
Phpmyadmin MySql Issue on Linux


I have a unique problem with my phpmyadmin. For eg whenever I create a table with 2 fields and save the table, I end up getting this :

ERROR:

CREATE TABLE `test` (

`tst1` VARCHAR( 4 ) NOT NULL ,
`tst2` VARCHAR( 5 ) NOT NULL ,
`tst1` VARCHAR( 4 ) NOT NULL ,
`tst2` VARCHAR( 5 ) NOT NULL
) TYPE = MYISAM

MySQL said:

#1060 - Duplicate column name 'sdg'

I initially thought it was my phpmyadmin was an issue. So I replaced it with another phpmyadmin of a another server. But it still showed the same thing..

Anybody out there with a solution...Pls help???
 
Old 03-22-2006, 08:01 PM   #2
shaunw
Member
 
Registered: Dec 2005
Posts: 77

Rep: Reputation: 15
Smile Duplicate names

Well I don't know phpmyadmin but just looking at you code it
appears that you are trying to create a table with FOUR fields.
Two of the fields are called tst1 and two of them are called
tst2. Field or column names must be unique. Maybe I am wrong,
please explain? Post your code not just the error message.
 
Old 03-22-2006, 08:02 PM   #3
rjcrews
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 193

Rep: Reputation: 30
cant have a table with the same name, ie tst1 and tst1
try different names
 
Old 03-23-2006, 12:08 AM   #4
rajnair0278
Member
 
Registered: Mar 2006
Posts: 62

Original Poster
Rep: Reputation: 15
Guys am sorry for not posting the complete table that I created. I know you cannot have duplicate names in a table. I create it like this

CREATE TABLE `test` (

`tst1` VARCHAR( 4 ) NOT NULL ,
`tst2` VARCHAR( 5 ) NOT NULL) TYPE = MYISAM

But when I save it in phpmyadmin it shows something like this:

MYSQL ERROR:

CREATE TABLE `test` (

`tst1` VARCHAR( 4 ) NOT NULL ,
`tst2` VARCHAR( 5 ) NOT NULL ,
`tst1` VARCHAR( 4 ) NOT NULL ,
`tst2` VARCHAR( 5 ) NOT NULL
) TYPE = MYISAM

MySQL said:

#1060 - Duplicate column name 'tst1'

Its very weird since it duplicates all the columns that I create in the table. However when I create the table from the mysql prompt its fine. Anybody with help and suggestions...??
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql and phpmyadmin jungleking Linux - Newbie 1 09-17-2005 08:07 AM
MYSQL problem (with phpmyadmin too) skeletor2069 Linux - Software 1 07-03-2005 08:05 AM
phpMyAdmin Security Issue mr_dizzle Linux - Software 2 12-28-2004 12:48 AM
MySQL - PHP5 - phpMyAdmin 2.6.0 Fuel Linux - Software 2 07-25-2004 01:39 PM
mysql <> phpmyadmin error rizza Linux - Software 0 01-28-2004 06:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration