diff --git a/reference/mysqli/functions/mysqli-debug.xml b/reference/mysqli/functions/mysqli-debug.xml index bd3be510fe..d3b5c7f891 100644 --- a/reference/mysqli/functions/mysqli-debug.xml +++ b/reference/mysqli/functions/mysqli-debug.xml @@ -1,5 +1,5 @@ - + mysqli_debug @@ -27,6 +27,13 @@ Return values mysqli_debug doesn't return any value. + + See also + + mysqli_dump_debug_info, + mysqli_report + + Example @@ -45,12 +52,6 @@ mysqli_debug("d:t:0,/tmp/client.trace"); - - See also - - mysqli_dump_debug_info - - + mysqli_errno @@ -42,9 +42,47 @@ See also - mysqli_error, mysqli_sqlstate + mysqli_connect_errno, + mysqli_connect_error, + mysqli_error, + mysqli_sqlstate + + Example + + + Object oriented style + +query("SET a=1")) { + printf("Errorcode: %d\n", $mysqli->errno); +} +$mysqli->close(); +?> +]]> + + + + Procedural style + + +]]> + + + + + mysqli_error @@ -32,32 +32,50 @@ A string that describes the error. An empty string if no error occurred. + + See also + + mysqli_connect_errno, + mysqli_connect_error, + mysqli_errno, + mysqli_sqlstate + + Example - Using the mysqli_error function + Object oriented style query("SET a=1")) { + printf("Errorcode: %d\n", $mysqli->error); +} +$mysqli->close(); +?> +]]> + + + + Procedural style + + ]]> - - - See also - - mysqli_errno, mysqli_sqlstate. - - + + mysqli_get_metadata - Retrieves a resultset from a prepared statement for metadata information. + Description + Procedural style: + + mixedmysqli_get_metadata + objectstmt + + Object oriented style (method): + + stmt - stringmysqli_get_metadata - objectstmt + mixed + get_metadata + void - - &warn.undocumented.func; - + + + If a statement passed to mysqli_prepare is one that produces + a result set, mysqli_get_metadata returns the result object + that can be used to process the meta information such as total number of fields + and individual field information. + + + This result set pointer can be passed as an argument to any of the + field-based functions that process result set metadata, such as: + + mysqli_num_fields + mysqli_fetch_field + mysqli_fetch_field_direct + mysqli_fetch_fields + mysqli_field_count + mysqli_field_seek + mysqli_field_tell + mysqli_free_result + + + + + The result set structure should be freed when you are done with it, + which you can do by passing it to mysqli_free_result + + + + The result set returned by mysqli_get_metadata contains only + metadata. It does not contain any row results. The rows are obtained by using the + statement handle with mysqli_fetch. + + + + + &reftitle.returnvalues; + + mysqli_get_metadata returns a result object or &false; if + an error occured. + + + + See also: + + mysqli_prepare, + mysqli_free_result + diff --git a/reference/mysqli/functions/mysqli-report.xml b/reference/mysqli/functions/mysqli-report.xml index f4bd446331..c0604817c8 100644 --- a/reference/mysqli/functions/mysqli-report.xml +++ b/reference/mysqli/functions/mysqli-report.xml @@ -1,9 +1,9 @@ - + mysqli_report - Sets report level. + enables or disables internal report functions Description @@ -11,9 +11,84 @@ boolmysqli_report intflags + + mysqli_report is a powerful function to improve your queries + and code during development and testing phase. Depending on the flags it reports + errors from mysqli function calls or queries which don't use an index (or use a bad + index). + + + Supported flags + + + + Name + Description + + + + + MYSQLI_REPORT_OFF + Turns reporting off + + + MYSQLI_REPORT_ERROR + Report errors from mysqli function calls + + + MYSQLI_REPORT_INDEX + Report if no index or bad index was used in a query + + + MYSQLI_REPORT_ALL + Set all options (report all) + + + +
+
+ + Return values + &return.success; + + + See also + + mysqli_debug, + mysqli_dump_debug_info + + + + Example + + + Object oriented style + +query("DROP TABLE IF EXISTS report"); +$mysqli->query("CREATE TABLE report (a int, b int, index(a))"); + +$mysqli->query("INSERT INTO report VALUES (1,1), (2,2), (1,3), (2,4), (6,5)"); + +/* this should report syntax error */ +$mysqli->query("UPDAE report SET a=a+1 WHERE b=3"); + +/* this should report index warning */ +$mysqli->query("UPDATE report SET a=a+1 WHERE b=3"); + +$mysqli->close(); +?> +]]> + + +
@@ -35,5 +110,4 @@ sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml -vi: ts=1 sw=1 -->