highaspen Posted March 1, 2006 Share Posted March 1, 2006 Does anybody out there know the mySQL syntax to not update a record if the input field is null? Quote Link to comment https://forums.phpfreaks.com/topic/3843-phpmysql-record-update/ Share on other sites More sharing options...
shocker-z Posted March 1, 2006 Share Posted March 1, 2006 if ($_POST !== '') {//query} else { echo("Field was NULL");}Or what you could do if you editing records is pull all your values into the txt fields first then you only have blank fields where there blank int he database anyway.. take a look at this..[a href=\"http://www.blucode.net/norman/ticket_view.php\" target=\"_blank\"]http://www.blucode.net/norman/ticket_view.php[/a]You can click edit and shows all the selections already then when u update it just does it wether it's blank or not because if blank then the user must have ment to make it blank for a reason. Quote Link to comment https://forums.phpfreaks.com/topic/3843-phpmysql-record-update/#findComment-13345 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.