Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
MySQL Query Error - Help Needed
Old 02-27-2009, 02:09 PM MySQL Query Error - Help Needed
Haris's Avatar
Novice Talker

Posts: 11
Name: Ali Haris
Trades: 0
Hello

I'm very new to MySQL & PHP Programming. I'm trying to Develop a Script by Following a Tutorial.

Tutorial Says to Use these SQL Queries, But I fails.
PHP Code:
CREATE TABLE `short_urls` (
`
idint(11NOT NULL auto_increment,
`
shortvarchar(6NOT NULL,
`
urlvarchar(1000NOT NULL,
`
stampeddatetime NOT NULL,
PRIMARY KEY  (`id`),
KEY `short` (`short`)
ENGINE=MyISAM  DEFAULT; 
It says
Code:
#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 '' at line 8
Can anyone Help me to fix this problem.

Thank you,
Haris is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-27-2009, 03:52 PM Re: MySQL Query Error - Help Needed
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
Try:

Code:
CREATE TABLE `short_urls` (
`id` int(11) NOT NULL auto_increment,
`short` varchar(6) NOT NULL,
`url` varchar(1000) NOT NULL,
`stamped` datetime NOT NULL,
PRIMARY KEY  (`id`),
KEY `short` (`short`)
) ENGINE=MyISAM
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 02-27-2009, 10:36 PM Re: MySQL Query Error - Help Needed
Haris's Avatar
Novice Talker

Posts: 11
Name: Ali Haris
Trades: 0
Thanks.. It worked
Haris is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to MySQL Query Error - Help Needed
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11122 seconds with 12 queries