@Napon
1.you realize that sql = mysql ? its just called sql because it is easier
2. sql_query as it is in u-232, and you ripped the code from there, it is used because they made a function called sql_query which does what mysqli is supposed to do and also because they have another function that show some stats used by mysql server
instead of mysqli_query they have sql_query just because of that function
PHP Code:
function mysql_fetch_all($query, $default_value = Array()) { $r = @sql_query($query); $result = Array(); if ($err = ((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)))return $err; if (@mysqli_num_rows($r)) while ($row = mysqli_fetch_array($r))$result[] = $row; if (count($result) == 0) return $default_value; return $result; }
PHP Code:
function sql_query($query) { global $query_stat; $query_start_time = microtime(true); // Start time $result = mysqli_query($GLOBALS["___mysqli_ston"], $query); $query_end_time = microtime(true); // End time $querytime = ($query_end_time - $query_start_time); $query_stat[] = array( 'seconds' => number_format($query_end_time - $query_start_time, 6) , 'query' => $query ); return $result; }
Mysqli is not such a huge thing, i dunno what ya keep blabbering about. There are a lot of converters which will convert simple mysql code into mysqli
If you want to blabber about something just do what joeroberts and I did which is to use PDO
I dont care, really, about anything you do, but at least make it right