query($sql_string); $error = $dbs->error; if ($error) { die(''); } if ($query->num_rows > 0) { while ($row = $query->fetch_row()) { echo ''."\n"; } } else { // output the SQL string // echo ''; echo ''; }