Duplicate Error

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Straterra
Forum Regular
Posts: 527
Joined: Mon Nov 24, 2003 8:46 am
Location: Indianapolis, Indiana
Contact:

Duplicate Error

Post by Straterra »

I get this error : Warning: sqlite_query(): duplicate column name: firstname in c:\ftp\users\straterra\eck\cgi-bin\tablemake1.php on line 22 : when I try to run this code

Code: Select all

<?php
$dbname = 'eckbios';
if ($db = sqlite_open($dbname, 0666, $sqliteerror)){
$createtable = sqlite_query($db, "create table clanprofile 
(firstname varchar(15),
lastname varchar(15),
middleinit varchar(5),
birthyear varchar(15),
firstname varchar(15),
socomname varchar(40),
socommap varchar(40),
sealswep varchar(15),
terrwep varchar(15),
website varchar(100),
hometown varchar(75),
picture varchar(150),
gender varchar(15),
birthday varchar(100),
occupation varchar(75),
bands varchar(200),
tvshows varchar(200),
movies varchar(200))");
} else {
  die ($sqliteerror);
}
?>
Please help!
microthick
Forum Regular
Posts: 543
Joined: Wed Sep 24, 2003 2:15 pm
Location: Vancouver, BC

Post by microthick »

You have firstname specified twice.

firstname varchar(15),
lastname varchar(15),
middleinit varchar(5),
birthyear varchar(15),
firstname varchar(15),
User avatar
aquila125
Forum Commoner
Posts: 96
Joined: Tue Dec 09, 2003 10:39 am
Location: Belgium

Post by aquila125 »

Thank God for error messages...
Post Reply