Skip to content

Commit

Permalink
mysql_list_fields
Browse files Browse the repository at this point in the history
  • Loading branch information
dicrtarasov committed Oct 11, 2019
1 parent f1334cb commit 9802c9e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mysql2i.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,9 @@ function mysql_set_charset($charset, $link = null)
{
return mysqli_set_charset(! empty($link) ? $link : mysql::$link, $charset);
}

function mysql_list_fields($database_name, $table_name, $link = NULL)
{
return mysqli_query(! empty($link) ? $link : mysql::$link, sprintf('SHOW COLUMNS FROM `%s`', $table_name));
}
}

0 comments on commit 9802c9e

Please sign in to comment.