Pwnna
Pwnna

Reputation: 9538

PHP MySQLi Stmt Prepare

How would I mysqli::stmt->bind_param something that's considered as NULL in mysql?

I'm currently using

$stmt->bind_param('s', 'NULL');

Upvotes: 0

Views: 303

Answers (1)

user137621
user137621

Reputation:

bind_param passes variable as reference.

Try:

$null = NULL;
$stmt->bind_param('s', $null);

Upvotes: 1

Related Questions