cvs: phpdoc /en/reference/mysql/functions mysql-field-type.xml

From: Date: Wed, 07 Jan 2004 00:24:48 +0000
Subject: cvs: phpdoc /en/reference/mysql/functions mysql-field-type.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969357998@lists.php.net to get a copy of this message
betz Tue Jan 6 19:24:48 2004 EDT Modified files: /phpdoc/en/reference/mysql/functions mysql-field-type.xml Log: example indent Index: phpdoc/en/reference/mysql/functions/mysql-field-type.xml diff -u phpdoc/en/reference/mysql/functions/mysql-field-type.xml:1.7 phpdoc/en/reference/mysql/functions/mysql-field-type.xml:1.8 --- phpdoc/en/reference/mysql/functions/mysql-field-type.xml:1.7 Mon Dec 15 11:52:07 2003 +++ phpdoc/en/reference/mysql/functions/mysql-field-type.xml Tue Jan 6 19:24:48 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> <refentry id="function.mysql-field-type"> <refnamediv> @@ -27,23 +27,23 @@ <programlisting role="php"> <![CDATA[ <?php - mysql_connect("localhost", "mysql_username", "mysql_password"); - mysql_select_db("mysql"); - $result = mysql_query("SELECT * FROM func"); - $fields = mysql_num_fields($result); - $rows = mysql_num_rows($result); - $table = mysql_field_table($result, 0); - echo "Your '" . $table . "' table has " . $fields . " fields and " . $rows . " record(s)\n"; - echo "The table has the following fields:\n"; - for ($i=0; $i < $fields; $i++) { - $type = mysql_field_type($result, $i); - $name = mysql_field_name($result, $i); - $len = mysql_field_len($result, $i); - $flags = mysql_field_flags($result, $i); - echo $type . " " . $name . " " . $len . " " . $flags . "\n"; - } - mysql_free_result($result); - mysql_close(); +mysql_connect("localhost", "mysql_username", "mysql_password"); +mysql_select_db("mysql"); +$result = mysql_query("SELECT * FROM func"); +$fields = mysql_num_fields($result); +$rows = mysql_num_rows($result); +$table = mysql_field_table($result, 0); +echo "Your '" . $table . "' table has " . $fields . " fields and " . $rows . " record(s)\n"; +echo "The table has the following fields:\n"; +for ($i=0; $i < $fields; $i++) { + $type = mysql_field_type($result, $i); + $name = mysql_field_name($result, $i); + $len = mysql_field_len($result, $i); + $flags = mysql_field_flags($result, $i); + echo $type . " " . $name . " " . $len . " " . $flags . "\n"; +} +mysql_free_result($result); +mysql_close(); ?> ]]> </programlisting>

« previous php.doc (#969357998) next »