Jump to content

Archived

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

highaspen

PHP/mySQL record update

Recommended Posts

Does anybody out there know the mySQL syntax to not update a record if the input field is null?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

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.