diff --git a/reference/mysql/functions/mysql-affected-rows.xml b/reference/mysql/functions/mysql-affected-rows.xml index dbc57f8364..db4ade54b3 100644 --- a/reference/mysql/functions/mysql-affected-rows.xml +++ b/reference/mysql/functions/mysql-affected-rows.xml @@ -1,5 +1,5 @@ - + @@ -56,18 +56,18 @@ ]]> @@ -88,15 +88,15 @@ Records deleted: 0 ]]> @@ -111,7 +111,7 @@ Updated Records: 10 - See also mysql_num_rows, + See also mysql_num_rows, and mysql_info. diff --git a/reference/mysql/functions/mysql-close.xml b/reference/mysql/functions/mysql-close.xml index a501ae9b79..40a8c43bdd 100644 --- a/reference/mysql/functions/mysql-close.xml +++ b/reference/mysql/functions/mysql-close.xml @@ -1,5 +1,5 @@ - + @@ -41,10 +41,10 @@ ]]> diff --git a/reference/mysql/functions/mysql-connect.xml b/reference/mysql/functions/mysql-connect.xml index bd72108e89..fe3452e8a8 100644 --- a/reference/mysql/functions/mysql-connect.xml +++ b/reference/mysql/functions/mysql-connect.xml @@ -1,5 +1,5 @@ - + @@ -99,10 +99,10 @@ ]]> diff --git a/reference/mysql/functions/mysql-create-db.xml b/reference/mysql/functions/mysql-create-db.xml index 29e3d28e86..8af8d41490 100644 --- a/reference/mysql/functions/mysql-create-db.xml +++ b/reference/mysql/functions/mysql-create-db.xml @@ -1,5 +1,5 @@ - + @@ -29,14 +29,14 @@ ]]> @@ -60,9 +60,7 @@ - See also - mysql_drop_db and - mysql_query. + See also mysql_query. diff --git a/reference/mysql/functions/mysql-data-seek.xml b/reference/mysql/functions/mysql-data-seek.xml index 787ff6b63c..1ddc807664 100644 --- a/reference/mysql/functions/mysql-data-seek.xml +++ b/reference/mysql/functions/mysql-data-seek.xml @@ -1,5 +1,5 @@ - + @@ -40,30 +40,30 @@ = 0; $i--) { - if (!mysql_data_seek($result, $i)) { - echo "Cannot seek to row $i: " . mysql_error() . "\n"; - continue; - } - - if (!($row = mysql_fetch_object($result))) - continue; - - echo "$row->last_name $row->first_name
\n"; +/* fetch rows in reverse order */ +for ($i = mysql_num_rows($result) - 1; $i >= 0; $i--) { + if (!mysql_data_seek($result, $i)) { + echo "Cannot seek to row $i: " . mysql_error() . "\n"; + continue; } - mysql_free_result($result); + if (!($row = mysql_fetch_object($result))) + continue; + + echo "$row->last_name $row->first_name
\n"; +} + +mysql_free_result($result); ?> ]]>
diff --git a/reference/mysql/functions/mysql-db-name.xml b/reference/mysql/functions/mysql-db-name.xml index 49d659c602..6938ab1b2f 100644 --- a/reference/mysql/functions/mysql-db-name.xml +++ b/reference/mysql/functions/mysql-db-name.xml @@ -1,5 +1,5 @@ - + @@ -35,17 +35,17 @@ ]]> diff --git a/reference/mysql/functions/mysql-drop-db.xml b/reference/mysql/functions/mysql-drop-db.xml index b2d5ce4188..46d5faabd2 100644 --- a/reference/mysql/functions/mysql-drop-db.xml +++ b/reference/mysql/functions/mysql-drop-db.xml @@ -1,5 +1,5 @@ - + @@ -41,9 +41,7 @@ - See also - mysql_create_db and - mysql_query. + See also mysql_query. diff --git a/reference/mysql/functions/mysql-errno.xml b/reference/mysql/functions/mysql-errno.xml index 46bab9b050..1c9aff3f74 100644 --- a/reference/mysql/functions/mysql-errno.xml +++ b/reference/mysql/functions/mysql-errno.xml @@ -1,5 +1,5 @@ - + @@ -35,14 +35,14 @@ ]]> diff --git a/reference/mysql/functions/mysql-error.xml b/reference/mysql/functions/mysql-error.xml index 4dfe60a9c7..7f3e68c724 100644 --- a/reference/mysql/functions/mysql-error.xml +++ b/reference/mysql/functions/mysql-error.xml @@ -1,5 +1,5 @@ - + @@ -37,14 +37,14 @@ ]]> diff --git a/reference/mysql/functions/mysql-escape-string.xml b/reference/mysql/functions/mysql-escape-string.xml index d3e0bf34c3..187e718219 100644 --- a/reference/mysql/functions/mysql-escape-string.xml +++ b/reference/mysql/functions/mysql-escape-string.xml @@ -1,5 +1,5 @@ - + @@ -37,9 +37,9 @@ ]]> diff --git a/reference/mysql/functions/mysql-fetch-array.xml b/reference/mysql/functions/mysql-fetch-array.xml index d46a7b5382..253da2df80 100644 --- a/reference/mysql/functions/mysql-fetch-array.xml +++ b/reference/mysql/functions/mysql-fetch-array.xml @@ -1,5 +1,5 @@ - + @@ -70,17 +70,17 @@ select table1.field as foo, table2.field as bar from table1, table2 ]]> @@ -90,17 +90,17 @@ select table1.field as foo, table2.field as bar from table1, table2 ]]> @@ -110,17 +110,17 @@ select table1.field as foo, table2.field as bar from table1, table2 ]]> diff --git a/reference/mysql/functions/mysql-fetch-assoc.xml b/reference/mysql/functions/mysql-fetch-assoc.xml index 637227440f..807c4002ce 100644 --- a/reference/mysql/functions/mysql-fetch-assoc.xml +++ b/reference/mysql/functions/mysql-fetch-assoc.xml @@ -1,5 +1,5 @@ - + @@ -49,45 +49,45 @@ ]]> diff --git a/reference/mysql/functions/mysql-get-client-info.xml b/reference/mysql/functions/mysql-get-client-info.xml index 0e89bc268d..a1a2ba8e9d 100644 --- a/reference/mysql/functions/mysql-get-client-info.xml +++ b/reference/mysql/functions/mysql-get-client-info.xml @@ -1,5 +1,5 @@ - + @@ -22,7 +22,7 @@ ]]> diff --git a/reference/mysql/functions/mysql-get-host-info.xml b/reference/mysql/functions/mysql-get-host-info.xml index 2bd4cc14d7..223d0cb772 100644 --- a/reference/mysql/functions/mysql-get-host-info.xml +++ b/reference/mysql/functions/mysql-get-host-info.xml @@ -1,5 +1,5 @@ - + @@ -25,9 +25,9 @@ ]]> diff --git a/reference/mysql/functions/mysql-get-proto-info.xml b/reference/mysql/functions/mysql-get-proto-info.xml index 1198e796bd..e0446190d6 100644 --- a/reference/mysql/functions/mysql-get-proto-info.xml +++ b/reference/mysql/functions/mysql-get-proto-info.xml @@ -1,5 +1,5 @@ - + @@ -25,9 +25,9 @@ ]]> diff --git a/reference/mysql/functions/mysql-get-server-info.xml b/reference/mysql/functions/mysql-get-server-info.xml index 6bddfb695d..2af2ded6f2 100644 --- a/reference/mysql/functions/mysql-get-server-info.xml +++ b/reference/mysql/functions/mysql-get-server-info.xml @@ -1,5 +1,5 @@ - + @@ -25,9 +25,9 @@ ]]> diff --git a/reference/mysql/functions/mysql-insert-id.xml b/reference/mysql/functions/mysql-insert-id.xml index eb786ac46f..02bf27296d 100644 --- a/reference/mysql/functions/mysql-insert-id.xml +++ b/reference/mysql/functions/mysql-insert-id.xml @@ -1,5 +1,5 @@ - + @@ -56,12 +56,12 @@ ]]> diff --git a/reference/mysql/functions/mysql-list-tables.xml b/reference/mysql/functions/mysql-list-tables.xml index b82bd547b7..8d8daba75e 100644 --- a/reference/mysql/functions/mysql-list-tables.xml +++ b/reference/mysql/functions/mysql-list-tables.xml @@ -1,5 +1,5 @@ - + @@ -47,26 +47,26 @@ ]]> diff --git a/reference/mysql/functions/mysql-query.xml b/reference/mysql/functions/mysql-query.xml index 21da3ed22b..9e1ca23863 100644 --- a/reference/mysql/functions/mysql-query.xml +++ b/reference/mysql/functions/mysql-query.xml @@ -1,5 +1,5 @@ - + @@ -46,7 +46,7 @@ <function>mysql_query</function> example diff --git a/reference/mysql/functions/mysql-result.xml b/reference/mysql/functions/mysql-result.xml index 2febf7f056..d2e736ed70 100644 --- a/reference/mysql/functions/mysql-result.xml +++ b/reference/mysql/functions/mysql-result.xml @@ -1,5 +1,5 @@ - + @@ -43,15 +43,15 @@ ]]> diff --git a/reference/mysql/functions/mysql-select-db.xml b/reference/mysql/functions/mysql-select-db.xml index 0ac53dd000..558a46e2e3 100644 --- a/reference/mysql/functions/mysql-select-db.xml +++ b/reference/mysql/functions/mysql-select-db.xml @@ -1,5 +1,5 @@ - + @@ -37,11 +37,11 @@ ]]> diff --git a/reference/mysql/functions/mysql-tablename.xml b/reference/mysql/functions/mysql-tablename.xml index 0c7d68bde1..01cf5390d6 100644 --- a/reference/mysql/functions/mysql-tablename.xml +++ b/reference/mysql/functions/mysql-tablename.xml @@ -1,5 +1,5 @@ - + @@ -27,13 +27,13 @@ ]]> diff --git a/reference/mysql/reference.xml b/reference/mysql/reference.xml index 55991b0927..968c41761d 100644 --- a/reference/mysql/reference.xml +++ b/reference/mysql/reference.xml @@ -1,5 +1,5 @@ - + MySQL Functions MySQL @@ -52,32 +52,32 @@ \n"; - while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { - echo "\t\n"; - foreach ($line as $col_value) { - echo "\t\t$col_value\n"; - } - echo "\t\n"; +/* Printing results in HTML */ +echo "\n"; +while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { + echo "\t\n"; + foreach ($line as $col_value) { + echo "\t\t\n"; } - echo "
$col_value
\n"; + echo "\t\n"; + } +echo "\n"; - /* Free resultset */ - mysql_free_result($result); +/* Free resultset */ +mysql_free_result($result); - /* Closing connection */ - mysql_close($link); +/* Closing connection */ +mysql_close($link); ?> ]]>
@@ -110,4 +110,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> -