Current location: Hot Scripts Forums » Programming Languages » PHP » MySQL with PHP question. HELP for a newbie


MySQL with PHP question. HELP for a newbie

Reply
  #1 (permalink)  
Old 08-01-03, 10:08 PM
kenfused kenfused is offline
Newbie Coder
 
Join Date: Aug 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
MySQL with PHP question. HELP for a newbie

In trying to setup a MySQL database thru phpMyAdmin (a "SITEMAPPER" script from HOTSCRIPTS...)

I entered the SQL txt text into the MySQL commands:

SQL-query : [Edit]

CREATE TABLE /*!32300 IF NOT EXISTS*/ section (
sectionID int(3) NOT NULL auto_increment,
parentID int(3) NOT NULL DEFAULT \'0\' ,
title varchar(255) NOT NULL DEFAULT \'\' ,
content text ,
PRIMARY KEY (sectionID),
INDEX title (title)
);

MySQL said:


You have an error in your SQL syntax near '\'0\' ,
title varchar(255) NOT NULL DEFAULT \'\' ,
content text ,
PRIMA' at line 3


Does anyone know what the error is?
What does it mean?
Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 08-02-03, 12:38 AM
Cagez's Avatar
Cagez Cagez is offline
Eeew, dirty!
 
Join Date: Jun 2003
Location: Toronto, Ontario
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
You put quotes around the 0 making it a string, but the field is a int.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 08-02-03, 12:51 AM
kenfused kenfused is offline
Newbie Coder
 
Join Date: Aug 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks! Got it!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 08-02-03, 01:53 AM
Cagez's Avatar
Cagez Cagez is offline
Eeew, dirty!
 
Join Date: Jun 2003
Location: Toronto, Ontario
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
No problemo.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 03:22 AM
PHP And MYSQL Developer Needed CarBoffin PHP 2 10-13-03 04:31 AM
Send sms via php and mysql database help meeeeee eggdesign PHP 2 10-03-03 01:29 AM
PHP header question khadlock PHP 2 09-23-03 09:17 AM
Free PHP, Perl and possible mySQL hosting! toby General Advertisements 8 06-17-03 02:04 AM


All times are GMT -5. The time now is 06:57 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.