homepage Welcome to WebmasterWorld Guest from 54.167.174.90
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

    
MySQL make '' insert 0 into decimal columns by default
andrewsmd

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4486603 posted 10:34 pm on Aug 20, 2012 (gmt 0)

I'm migrating a PHP system that was running on a linux box to a windows server. I'm running into issues that wherever there is a INSERT INTO TABLE(column1) VALUES(''); it errors. On the linux box, it inserts 0, but on the windows machine it fails. How do I go about making the windows box also insert 0. Is this a possible problem from some default value not getting copied properly? I moved this MySQL database with mysqldump through PHPMyAdmin

 

brotherhood of LAN

WebmasterWorld Administrator brotherhood_of_lan us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



 
Msg#: 4486603 posted 12:04 am on Aug 21, 2012 (gmt 0)

perhaps the linux version had an auto-increment, and because it's a primary key a standard insert is failing.

andrewsmd

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4486603 posted 1:36 pm on Aug 21, 2012 (gmt 0)

No, the ID column auto increments fine. These are columns that hold charges.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved