View Single Post
  #4 (permalink)  
Old 09-28-06, 07:36 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
you're insert query is wrong:
it should be:
PHP Code:

$query "INSERT INTO entries ('id', 'title', 'content', 'date') VALUES('', 'my_title', 'my_content', 'my_date')";

// or:
$query "INSERT INTO entries VALUES('', 'my_title', 'my_content', 'my_date')";
// or:
$query "INSERT INTO entries SET title='my_title', content='my_content', date='my_date'"
the reason why you got this error is because you were assigning a string to an integer type: id was an int(4) NOT NULL auto_increment, not a string

UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote