refiking Posted May 24, 2009 Share Posted May 24, 2009 I want to write the code so that the `elem` field can't have a value of ''. By default, it automatically places Unknown there. How can I do that? I've tried to set the field to NULL and Unknown as default. Shouldn't that change the records currently in the db, or will I have to do that manually? Link to comment https://forums.phpfreaks.com/topic/159485-cluless-on-a-forced-default-entry/ Share on other sites More sharing options...
Ken2k7 Posted May 25, 2009 Share Posted May 25, 2009 Well, you can check your data with PHP's empty before INSERTing data into the database. Link to comment https://forums.phpfreaks.com/topic/159485-cluless-on-a-forced-default-entry/#findComment-841437 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.