PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php //turn the exception more off mysqli_report(MYSQLI_REPORT_ALL ^ MYSQLI_REPORT_STRICT); $query = "SELECT 'ok 1'; SELECT 'ok 2'; SElllllECT 'failed'; # error in the 3rd query SELECT 'ok 3'"; if(mysqli_multi_query($mysqli,$query)){ do{ list($current_table,$current_query)=each($queries); if($current_table!="CURRENT_USER"){ printf("-----------------\n"); } if($result=mysqli_store_result($mysqli)){ if(mysqli_num_rows($result)<1){ echo "<p>Logic Error @ $current_table Query<br>$current_query</p>"; }else{ while($row=mysqli_fetch_row($result)){ printf("%s\n",$row[0]); } } mysqli_free_result($result); } } while(mysqli_more_results($mysqli) && mysqli_next_result($mysqli)); }else{ list($current_table,$current_query)=each($queries); } if($error=mysqli_error($mysqli)){ echo "<p>Syntax Error @ $current_table Query<br>$current_query<br>Error: $error</p>"; }
Show:  
Copy Clear