PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php // the exception mode is turned on on connect, as it should $query = "SELECT 'ok 1'; SELECT 'ok 2'; SElllllECT 'failed'; # error in the 3rd query SELECT 'ok 3'"; $mysqli->multi_query($query); do { /* store first result set */ if ($result = $mysqli->store_result()) { while ($row = $result->fetch_row()) { printf("%s\n", $row[0]); } } /* print divider */ echo "-----------------\n"; } while ($mysqli->more_results() && $mysqli->next_result());
Show:  
Copy Clear