changeset 1378 | e58294b867c1 |
parent 1377 | fa2b0825bbc5 |
1377:fa2b0825bbc5 | 1378:e58294b867c1 |
---|---|
30 return false; |
30 return false; |
31 $debug = $debug[0]['file'] . ', line ' . $debug[0]['line']; |
31 $debug = $debug[0]['file'] . ', line ' . $debug[0]['line']; |
32 echo "<b>$errtype:</b> $errstr<br />Error source:<pre>$debug</pre>"; |
32 echo "<b>$errtype:</b> $errstr<br />Error source:<pre>$debug</pre>"; |
33 } |
33 } |
34 |
34 |
35 /** |
|
36 * Checks to see if a given pdo driver is available. |
|
37 * @param string driver name |
|
38 * @return bool |
|
39 */ |
|
40 |
|
41 function have_pdo($driver) |
|
42 { |
|
43 return class_exists('PDO') && extension_loaded("pdo_$driver") && class_exists("{$driver}_pdo"); |
|
44 } |
|
45 |
|
35 global $db_sql_parse_time; |
46 global $db_sql_parse_time; |
36 $db_sql_parse_time = 0; |
47 $db_sql_parse_time = 0; |
37 |
48 |
38 class mysql { |
49 class mysql { |
39 var $num_queries, $query_backtrace, $query_times, $query_sources, $latest_result, $latest_query, $_conn, $sql_stack_fields, $sql_stack_values, $debug; |
50 var $num_queries, $query_backtrace, $query_times, $query_sources, $latest_result, $latest_query, $_conn, $sql_stack_fields, $sql_stack_values, $debug; |
40 var $row = array(); |
51 var $row = array(); |
41 var $rowset = array(); |
52 var $rowset = array(); |
42 var $errhandler; |
53 var $errhandler; |
43 var $dbms_name = 'MySQL'; |
54 var $dbms_name = 'MySQL (legacy)'; |
44 |
55 |
45 /** |
56 /** |
46 * Get a flat textual list of queries that have been made. |
57 * Get a flat textual list of queries that have been made. |
47 */ |
58 */ |
48 |
59 |
704 class mysql_pdo { |
715 class mysql_pdo { |
705 var $num_queries, $query_backtrace, $query_times, $query_sources, $latest_result, $latest_query, $_conn, $sql_stack_fields, $sql_stack_values, $debug; |
716 var $num_queries, $query_backtrace, $query_times, $query_sources, $latest_result, $latest_query, $_conn, $sql_stack_fields, $sql_stack_values, $debug; |
706 var $row = array(); |
717 var $row = array(); |
707 var $rowset = array(); |
718 var $rowset = array(); |
708 var $errhandler; |
719 var $errhandler; |
709 var $dbms_name = 'MySQL'; |
720 var $dbms_name = 'MySQL/PDO'; |
710 |
721 |
711 /** |
722 /** |
712 * Get a flat textual list of queries that have been made. |
723 * Get a flat textual list of queries that have been made. |
713 */ |
724 */ |
714 |
725 |