If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > PHPMyAdmin Error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-29-04, 12:45
Wealth-Builderz Wealth-Builderz is offline
Registered User
 
Join Date: Oct 2004
Posts: 29
Exclamation PHPMyAdmin Error

I am using PHPMyAdmin to create my MySQL database and test it by running some queries on it. I've created the database which was fine but when trying to create a table for that database (using the provided GUI) I keep getting this error:

MySQL said:

#1064 - 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 '(32) NOT NULL, `Last_Name ` TEXT(32) NOT NULL, `Username ` VARC

This is the CREATE TABLE syntax that PHPMyAdmin genereates:

SQL-query:

CREATE TABLE `Person` (

`Person_ID ` INT( 10 ) NOT NULL AUTO_INCREMENT ,
`First_Name ` TEXT( 32 ) NOT NULL ,
`Last_Name ` TEXT( 32 ) NOT NULL ,
`Username ` VARCHAR( 32 ) NOT NULL ,
`Password ` VARCHAR( 32 ) NOT NULL ,
`PersonType_ID ` INT( 10 ) NOT NULL ,
PRIMARY KEY ( `Person_ID ` )
) TYPE = MYISAM


I don't understand why it uses all the quotes, I'm confused ?????????

Regards

Wealth-Builderz

Last edited by Wealth-Builderz; 11-30-04 at 08:15.
Reply With Quote
  #2 (permalink)  
Old 11-29-04, 20:06
joeldixon66 joeldixon66 is offline
Registered User
 
Join Date: Jul 2003
Posts: 73
Are you actually including a space character after each column name? In the script you provided (and error message) there is a space character after Person_ID enclosed in the quotes. I'm not sure if this might be causing the issue.
__________________
Joel Dixon
Analyst Programmer
Melbourne, Australia
Reply With Quote
  #3 (permalink)  
Old 11-29-04, 20:12
joeldixon66 joeldixon66 is offline
Registered User
 
Join Date: Jul 2003
Posts: 73
sorry - my reply was duplicated.

Last edited by joeldixon66; 11-29-04 at 20:13. Reason: Duplicate Post
Reply With Quote
  #4 (permalink)  
Old 11-30-04, 07:40
Wealth-Builderz Wealth-Builderz is offline
Registered User
 
Join Date: Oct 2004
Posts: 29
I'm using the PHPMyAdmin GUI to enter my table name and it's accompanying attributes and this is how the code is generated. I know it's syntax is not correct but it's auto-generated so surely it should be correct and run! Very strange??????

Last edited by Wealth-Builderz; 11-30-04 at 08:16.
Reply With Quote
  #5 (permalink)  
Old 11-30-04, 12:49
Wealth-Builderz Wealth-Builderz is offline
Registered User
 
Join Date: Oct 2004
Posts: 29
Exclamation

It's ok I've sussed it. Thanks for your reply anyway.
Reply With Quote
  #6 (permalink)  
Old 11-30-04, 16:28
savbill savbill is offline
Registered User
 
Join Date: Feb 2004
Posts: 533
I can't comment on PHPMyAdmin because I haven't used it much. I've been using SQL Yog, which has some great tools for creating tables, testing SQL and just about anything your going to need for managing MySQL Databases. You can get info and download a copy, free for personal and comercial use, at:

http://www.webyog.com/index.php



.
__________________
~

Bill
Reply With Quote
Reply

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On