PHP » GoLang |
login |
register |
about
|
GoLang mysql_list_fields
request it (354)
GoLang replacement for PHP's mysql_list_fields
[edit | history]
mysql_list_fields(PHP 4, PHP 5) mysql_list_fields — List MySQL table fields Warning
This function was deprecated in PHP 5.4.0, and it and the entire original MySQL extension was removed in PHP 7.0.0. Instead, use either the actively developed MySQLi or PDO_MySQL extensions. See also the MySQL: choosing an API guide and its related FAQ entry for additional information. Alternatives to this function include:
Description
resource mysql_list_fields
( string
$database_name
, string $table_name
[, resource $link_identifier = NULL
] )Retrieves information about the given table name. This function is deprecated. It is preferable to use mysql_query() to issue an SQL SHOW COLUMNS FROM table [LIKE 'name'] statement instead. Parameters
Return Values
A result pointer resource on success, or The returned result can be used with mysql_field_flags(), mysql_field_len(), mysql_field_name() and mysql_field_type(). Examples
Example #1 Alternate to deprecated mysql_list_fields()
<?php The above example will output something similar to: Array ( [Field] => id [Type] => int(7) [Null] => [Key] => PRI [Default] => [Extra] => auto_increment ) Array ( [Field] => email [Type] => varchar(100) [Null] => [Key] => [Default] => [Extra] => ) Notes
See Also
|
more
Recently updated
more
Most requested
more
Last requests
|