By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,667 Members | 2,603 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,667 IT Pros & Developers. It's quick & easy.

MYSQLI: Null value in bind_param() ??

P: n/a
Hello,

Could anyone tell me if it is possible to bind a null value to a
statement? I.E.
$stmt->bind_param('isd',$var1,$var2,$var3);
$var1 = (something indicating null);
$var2 = (something indicating null);
$var3 = (something indicating null);

This would be useful as I have form fields that are not required and
link to database fields that allow nulls. It would be nice to include
all fields in the statement but assign a null value to fields for which
the user did not fill in the corresponding form element.

Thank you,
Ryan

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 6 Apr 2005 08:15:39 -0700, "yutlin" <yu****@gmail.com> wrote:
Hello,

Could anyone tell me if it is possible to bind a null value to a
statement? I.E.
$stmt->bind_param('isd',$var1,$var2,$var3);
$var1 = (something indicating null);
$var2 = (something indicating null);
$var3 = (something indicating null);

This would be useful as I have form fields that are not required and
link to database fields that allow nulls. It would be nice to include
all fields in the statement but assign a null value to fields for which
the user did not fill in the corresponding form element.


Doesn't bind_param support the PHP null value?

$var1= null;
$var2= null;
$var3= null;

???

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.