Medeno
Medeno

Reputation: 171

Should I use "IF" for mysqli $stmt prepare

I have been using prepared statements with "IF" and without "IF", is there any difference? example;

if ($stmt = $mysqli->prepare) {}

and

$stmt1=$mysqli->prepare;

Upvotes: 0

Views: 31

Answers (1)

Jeremy Roman
Jeremy Roman

Reputation: 16355

If there is no body to your if statement, then no, there is no difference.

Upvotes: 1

Related Questions