3, December 2008

mysql error upon entry of normal query - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  Databases  >  MySQL
Topic: mysql error upon entry of normal query
« previous next »
Pages: [1] Print

Author Topic: mysql error upon entry of normal query  (Read 692 times)
aka J Love
Community Supporter ?
Bill Gates is my home boy
*****
Gender: Male
Posts: 884
1636 credits
Members referred : 4



« on: Jan 23, 2006, 04:53:44 PM »

i receive a mysql error when trying to run this simple, everyday, normal query:

Code:
CREATE TABLE `news` (
`id` int(10) NOT NULL auto_increment,
`title` varchar(50) NOT NULL default '',
`author` varchar(30) NOT NULL default '',
`content` text NOT NULL,
`postdate` varchar(25) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM

CREATE TABLE `news_comments` (
`id` int(10) NOT NULL auto_increment,
`author` varchar(30) NOT NULL default '',
`content` text NOT NULL,
`postdate` varchar(125) NOT NULL default '',
`nid` varchar(30) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM

this is the error that i receive

Quote
#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 'CREATE TABLE `news_comments` (
`id` int(10) NOT NULL auto_inc

Visit through proxy Visit through proxy Visit through proxy

Last blog : phpHaze 1.59.1 in Development
aka J Love
Community Supporter ?
Bill Gates is my home boy
*****
Gender: Male
Posts: 884
1636 credits
Members referred : 4



« Reply #1 on: Jan 23, 2006, 05:50:03 PM »

nevermind, discovered the problem. this query came from a newer (or older, not sure) of mysql. here is the solution:

change

Code:
TYPE=MyISAM

to

Code:
TYPE=MyISAM AUTO_INCREMENT=1 

Visit through proxy Visit through proxy Visit through proxy

Last blog : phpHaze 1.59.1 in Development
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=1328
Tags : mysql Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  Databases  >  MySQL
Topic: mysql error upon entry of normal query
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Dec 03, 2008, 11:18:59 PM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!





Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.