Rommeo Posted December 11, 2011 Share Posted December 11, 2011 Let's say my user_table has following fields; username name surname country but I'm just inserting to one field and skipping the rest: $query = "insert into user_table ( username ) VALUES ( $username) "; mysql_query($query); Does inserting data like this cause any unwanted problems ? Link to comment https://forums.phpfreaks.com/topic/252946-would-this-cause-any-problem/ Share on other sites More sharing options...
The Little Guy Posted December 11, 2011 Share Posted December 11, 2011 It shouldn't, but your table should have default values, such as null. Link to comment https://forums.phpfreaks.com/topic/252946-would-this-cause-any-problem/#findComment-1296911 Share on other sites More sharing options...
Rommeo Posted December 11, 2011 Author Share Posted December 11, 2011 It shouldn't, but your table should have default values, such as null. if my table does not have default or null values ? what kind of problem would I face ? Link to comment https://forums.phpfreaks.com/topic/252946-would-this-cause-any-problem/#findComment-1296941 Share on other sites More sharing options...
fenway Posted December 12, 2011 Share Posted December 12, 2011 Depends if you're running in strict mode or not. Link to comment https://forums.phpfreaks.com/topic/252946-would-this-cause-any-problem/#findComment-1296984 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.