[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 11-14-2007, 06:59 PM   #1 (permalink)
NamePros Member
 
Join Date: Dec 2005
Posts: 78
10.00 NP$ (Donate)

tez30 is an unknown quantity at this point


database help needed asap!!!

i'm catch hell with this tables(my first time working with them)
when i test my registration for my site i get's this error

Error in checking :Table 'playstat_ps2t.users' doesn't exist


so i opened cpanel and opened phpmyadmin to create my tables then i got this error

Error
SQL query:

CREATE TABLE `members` (

`username` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL AUTO_INCREMENT ,
`password` VARCHAR( 16 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
`first_name` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
`last_name` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
`address` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
`city` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
`state` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
`interested_game` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
`email_address` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
`phone_number` INT( 11 ) NOT NULL ,
`age` INT( 2 ) NOT NULL
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci COMMENT = 'registration for ps2-tournament'

MySQL said:

#1063 - Incorrect column specifier for column 'username'

can anybody please help me out?
thanks in advance.
tez30 is offline  
Old 11-14-2007, 07:14 PM   #2 (permalink)
NamePros Regular
 
baxter's Avatar
 
Join Date: Apr 2006
Posts: 289
1,990.00 NP$ (Donate)

baxter is a jewel in the roughbaxter is a jewel in the roughbaxter is a jewel in the rough

Ethan Allen Fund Save The Children
you have username field set to text and you can't auto increment a text field. I believe thats what the error is telling you.
__________________
Chimps.ca - Swans.ca - Snails.ca
baxter is offline  
Old 11-14-2007, 11:05 PM   #3 (permalink)
i love automation
 
xrvel's Avatar
 
Join Date: Nov 2007
Posts: 1,409
987.78 NP$ (Donate)

xrvel has much to be proud ofxrvel has much to be proud ofxrvel has much to be proud ofxrvel has much to be proud ofxrvel has much to be proud ofxrvel has much to be proud ofxrvel has much to be proud ofxrvel has much to be proud ofxrvel has much to be proud ofxrvel has much to be proud of


Table 'playstat_ps2t.users' doesn't exist

Have you created a table which is named users , in database playstat_ps2t ?
xrvel is offline  
Old 11-15-2007, 06:56 AM   #4 (permalink)
NamePros Member
 
Join Date: Dec 2005
Posts: 78
10.00 NP$ (Donate)

tez30 is an unknown quantity at this point


know i'm getting this error:

Error in registering user : .You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sab2829@yahoo.com','334-749-3616',0,'%2007-%11-%15 %09-%45-%02','s.c.a#',0,'28ae' at line 1
tez30 is offline  
Old 11-15-2007, 08:03 AM   #5 (permalink)
Senior Member
 
Peter's Avatar
 
Join Date: Nov 2003
Location: Scotland
Posts: 4,900
0.60 NP$ (Donate)

Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute

Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
can you show us the full SQL you are trying to execute.
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Old 11-15-2007, 08:23 AM   #6 (permalink)
NamePros Member
 
Join Date: Dec 2005
Posts: 78
10.00 NP$ (Donate)

tez30 is an unknown quantity at this point


this is the sql i'm triing to execute:

Field Type - Collation ---- Attributes ---- Null --- Default --- Extra Action
username - text ---- utf8_unicode_ci -- No
password - varchar(16) - utf8_unicode_ci -- No
first_name - text -------- utf8_unicode_ci -- No
last_name - text -------- utf8_unicode_ci -- No
address --- text -------- utf8_unicode_ci -- No
city ------- text -------- utf8_unicode_ci -- No
state ----- text --------- utf8_unicode_ci -- No
interested_game - text -- utf8_unicode_ci -- No
email_address - text ---- utf8_unicode_ci -- No
phone_number - int(11) -- -- No
age ------ int(2) -------- -- No

can anybody tell me what i'm doing wrong?
tez30 is offline  
Old 11-15-2007, 09:39 AM   #7 (permalink)
Senior Member
 
Peter's Avatar
 
Join Date: Nov 2003
Location: Scotland
Posts: 4,900
0.60 NP$ (Donate)

Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute

Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
that isnt the sql you are trying to execute that looks more like a copy of the table structure.
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Old 11-15-2007, 10:33 AM   #8 (permalink)
Senior Member
 
Peter's Avatar
 
Join Date: Nov 2003
Location: Scotland
Posts: 4,900
0.60 NP$ (Donate)

Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute

Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
okay had a quick look and it looks to me like you are trying to enclose $game in single quotes for the SQL but you did not close them

Change

PHP Code:
$qry = mysql_query("insert into users(affid,username,password,fname,lname,address, city,state,game,paypalemailaddress,phone,credits,d ateapplied,notify,active,confirmcode) ".
" values(".$affid.",'".$uname."','".$pwd."','".$fname."','".$lname."','".$address."','".$city."','".$state."','".$game.
",'".$email."','".$ph."',".$credits.",'".date('%Y-%m-%d %H-%i-%s')."','".$game."#',0,'".$code."')") or die("Error in registering user : $username .".mysql_error());
Too

PHP Code:
$qry = mysql_query("insert into users(affid,username,password,fname,lname,address, city,state,game,paypalemailaddress,phone,credits,d ateapplied,notify,active,confirmcode) ".
" values(".$affid.",'".$uname."','".$pwd."','".$fname."','".$lname."','".$address."','".$city."','".$state."','".$game.
"','".$email."','".$ph."',".$credits.",'".date('%Y-%m-%d %H-%i-%s')."','".$game."#',0,'".$code."')") or die("Error in registering user : $username .".mysql_error());
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Old 11-15-2007, 11:21 AM   #9 (permalink)
NamePros Member
 
Join Date: Dec 2005
Posts: 78
10.00 NP$ (Donate)

tez30 is an unknown quantity at this point


now i'm gettin this error:

Error in registering user : .You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ateapplied,notify,active,confirmcode) values(0,'test','12345','joe','horn'' at line 1

do i have to have a field for all of these?

Last edited by tez30; 11-19-2007 at 07:29 AM.
tez30 is offline  
Old 11-15-2007, 11:54 AM   #10 (permalink)
Senior Member
 
Peter's Avatar
 
Join Date: Nov 2003
Location: Scotland
Posts: 4,900
0.60 NP$ (Donate)

Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute

Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
Yes there has to be a filed which correspond to each of those within the users table
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Old 11-16-2007, 03:50 AM   #11 (permalink)
NamePros Member
 
Join Date: Dec 2005
Posts: 78
10.00 NP$ (Donate)

tez30 is an unknown quantity at this point


thanks alot peter@flexiwebhost, i fixed it
tez30 is offline  
Closed Thread


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

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


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 06:24 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85