Jump to content

[SOLVED] mysql is a crazy thing


felipeebs

Recommended Posts

my code is something like this:

$value = "10-2008";
mysql_query("insert into editions(edition) values ($value)");

 

But it's not inserting "10-2008" in the table, is inserting "-1998"

 

the "editions" table is

id int(9) auto_increment,
edition varchar(7) not null

 

why is this happening? how to avoid?

 

thank's

Link to comment
https://forums.phpfreaks.com/topic/129286-solved-mysql-is-a-crazy-thing/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.