Re: Fwd: [PHP-BUG] Bug #73234 [NEW]: emulated statementslet value dictate parameter type

From: Date: Wed, 12 Oct 2016 08:58:31 +0000
Subject: Re: Fwd: [PHP-BUG] Bug #73234 [NEW]: emulated statementslet value dictate parameter type
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.internals 
Request: Send a blank email to internals+get-96324@lists.php.net to get a copy of this message
On 11/10/2016 17:39, Lester Caine wrote:
The importance of 'null' in relation to SQL data sets is something that PHP seems to push under the carpet a bit. It is essential to the way SQL works and so needs to mirror properly which trying to emulate something without having the correct metadata defining each field is only ever going to be a guess?
It seems pretty trivial to me: SQL distinguishes between the string '' and null, and so does PHP. If you pass a PHP null to a query, PHP should do as you say and send an SQL null, and the DB can give an appropriate error if null is not allowed in that context. Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#96324) next »