Jump to content

When to use mysqli::stmt_init?


paddy_fields

Recommended Posts

I make a prepared statement in the manner below;

$stmt = $db->prepare("SELECT * FROM table WHERE id = ?");
$stmt->bind_param('i',$id);
$stmt->execute();
$result = $stmt->fetch_assoc(); 
$stmt->close();

But I've seen certain scripts initialising the statement first using stmt_init

 

In what scenario would this be necessary/benifitial to do so?  

Link to comment
https://forums.phpfreaks.com/topic/286917-when-to-use-mysqlistmt_init/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.