= ? __QUERY; if ($stmt = $mysqli->prepare($query)) { // compile and prepare $query. $stmt->bind_param('si', $icity, $istatus); // bind 'si' data types. // 'si': type definition string // i: intgeger is the daga type of $istatus. // s: $icity is of the data type string. /* execute prepared statement */ $stmt->execute(); $stmt->bind_result($snum, $sname, $city, $status); $stmt->store_result(); if ($stmt->num_rows > 0) { echo"

Result: Suppliers in $icity with status > $istatus:

\n"; echo "\n"; echo "\n"; /* fetch values */ while ($stmt->fetch()) { echo "\n"; } echo "
Supplier NumSupplier NameCityStatus
" . $snum . "" . $sname . "" . $city . "" . $status . "
\n"; /* Destroy the result set and free the memory used for it */ $stmt->free_result(); } else { echo "No result for $icity with status > $istatus.\n"; } } $mysqli->close(); ?>