MySQL Forums
Forum List  »  PHP

Re: submitting null value from php to MySql
Posted by: Peter Brawley
Date: October 30, 2020 10:16AM

php empty() includes an empty string for char values, 0 for numerics &c; none of that implies that the column in question is nullable, so I think that's unsound. Better: invoke mysqli_fetch_field(), check the type, default value, and the nullable flag.

Options: ReplyQuote


Subject
Written By
Posted
Re: submitting null value from php to MySql
October 30, 2020 10:16AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.