close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

SQL "users" table set up error

Thread began 8/11/2009 10:08 am by marco360817 | Last modified 8/12/2009 12:47 pm by Jimmy Wu | 3194 views | 3 replies |

marco360817

SQL "users" table set up error

I have tried to run the sql script on my server running php 4 and 5. when i try to run the script i receive the following error:

Error
SQL-query :
CREATE TABLE `users` (
`UserID` int( 11 ) NOT NULL auto_increment,
`UserEmail` varchar( 500 ) default NULL ,
`UserPassword` varchar( 500 ) default NULL ,
`UserFirstName` varchar( 50 ) default NULL ,
`UserLastName` varchar( 50 ) default NULL ,
`UserCity` varchar( 90 ) default NULL ,
`UserState` varchar( 20 ) default NULL ,
`UserZip` varchar( 12 ) default NULL ,
`UserEmailVerified` tinyint( 1 ) default '0',
`UserRegistrationDate` timestamp NULL default ‘CURRENT_TIMESTAMP’,
`UserVerificationCode` varchar( 20 ) default NULL ,
`UserIP` varchar( 50 ) default NULL ,
`UserPhone` varchar( 20 ) default NULL ,
`UserFax` varchar( 20 ) default NULL ,
`UserCountry` varchar( 20 ) default NULL ,
`UserAddress` varchar( 100 ) default NULL ,
`UserAddress2` varchar( 50 ) default NULL ,
PRIMARY KEY ( `UserID` )
)
MySQL said:
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 'defaultCURRENT_TIMESTAMP, `UserVerificationCode` varchar( 20 ) default NULL , ' at line 1

Please let me know how to solve this issue. the code above has syntax issues. please advice.

Thank you,

Marco

877 392 2682

Sign in to reply to this post

Jimmy Wu

I do get the same error when I run the query you provided, however I just downloaded the solution pack from our website and ran the query from there and there were no errors. It does look like your query is slightly different from the one I just ran. Try downloading the solution pack again to see if that will get you the correct files.

Here is the query from the solution pack I just downloaded:
CREATE TABLE `users` (
`UserID` int(11) NOT NULL auto_increment,
`UserEmail` varchar(500) default NULL,
`UserPassword` varchar(500) default NULL,
`UserFirstName` varchar(50) default NULL,
`UserLastName` varchar(50) default NULL,
`UserCity` varchar(90) default NULL,
`UserState` varchar(20) default NULL,
`UserZip` varchar(12) default NULL,
`UserEmailVerified` tinyint(1) default '0',
`UserRegistrationDate` timestamp NULL default CURRENT_TIMESTAMP,
`UserVerificationCode` varchar(20) default NULL,
`UserIP` varchar(50) default NULL,
`UserPhone` varchar(20) default NULL,
`UserFax` varchar(20) default NULL,
`UserCountry` varchar(20) default NULL,
`UserAddress` varchar(100) default NULL,
`UserAddress2` varchar(50) default NULL,
PRIMARY KEY (`UserID`)
)


Looks like this is the line that changed:
`UserRegistrationDate` timestamp NULL default ‘CURRENT_TIMESTAMP’,

Sign in to reply to this post

marco360817

SQL table creation still causing problems.

hi Jimmy,

i ran the script that i downloaded from your server and i still get the same error. l also tried pasting the code you sent below and still the same. i am not sure what syntax could be missing. can you please check the code for commas or missing/misplaced syntax?
i am really getting frustrate over this script issue. Thank you in advance for your help.

Marco

Sign in to reply to this post

Jimmy Wu

Are you still getting the same error when running the query I posted for you?

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...