$connection= new mysqli(“localhost”, “user”, “pass”, “databse”);
$stat= $connection->prepare(‘SELECT * FROM products WHERE productID= ?’);
$stat->bind_param("s", $productid);
$stat->execute();
$result = $stat->get_result();
while ($row = $result->fetch_assoc()) {
// bla bla
}
a ovako izgleda ispis na php info:
mysqlnd enabled
Version mysqlnd 5.0.10 - 20111026 - $Id: e707c415db32080b3752b232487a435ee0372157 $
Compression supported
SSL supported
Command buffer size 4096
Read buffer size 32768
Read timeout 31536000
Collecting statistics Yes
Collecting memory statistics No
Tracing n/a
Loaded plugins mysqlnd,example,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password
API Extensions pdo_mysql