| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Member | 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.
__________________ |
| |
| | #4 (permalink) |
| NamePros Member | 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
__________________ |
| |
| | #5 (permalink) |
| Senior Member | 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 |
| |
| | #6 (permalink) |
| NamePros Member | 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?
__________________ |
| |
| | #7 (permalink) |
| Senior Member | 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 |
| |
| | #8 (permalink) |
| Senior Member | 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: PHP Code:
__________________ Manage your portfolio using my new Domain Portfolio Management script. Securing Your Domain Name From Theft |
| |
| | #9 (permalink) |
| NamePros Member | 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. |
| |
| | #10 (permalink) |
| Senior Member | 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 |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |