View Single Post
  #4 (permalink)  
Old 09-28-06, 06:36 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community VIP
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 2,724
Thanks: 0
Thanked 0 Times in 0 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

If you want to add me on any IM, pm me first
Reply With Quote