mysqli_query($link, "DROP TABLE IF EXISTS friends");
mysqli_query($link, "CREATE TABLE friends (id int, name varchar(20))");
mysqli_query($link, "INSERT INTO friends VALUES (1,'Hartmut'), (2, 'Ulf')");
mysqli_real_query($link, "SELECT * FROM friends");
if (mysqli_field_count($link)) {
/* this was a select/show or describe query */
$result = mysqli_store_result($link);
/* process resultset */
$row = mysqli_fetch_row($result);
/* free resultset */
mysqli_free_result($result);
}
/* close connection */
mysqli_close($link);
?>
20.7.3.9.18. mysqli::get_charset,
Copyright 1997-2012 the PHP Documentation Group. [2230]
•
mysqli::get_charset
mysqli_get_charset
Returns a character set object
Description
Object oriented style
object mysqli::get_charset();
Procedural style
object mysqli_get_charset(
mysqli link);
Returns a character set object providing several properties of the current active character set.
Parameters
link
Return Values
The function returns a character set object with the following properties:
charset
collation
dir
min_length
max_length
MySQL Improved Extension (Mysqli)
mysqli_get_charset
Procedural style only: A link identifier returned by
mysqli_connect
Character set name
Collation name
Directory the charset description was fetched from (?) or "" for built-
in character sets
Minimum character length in bytes
Maximum character length in bytes
2373
or
mysqli_init
Need help?
Do you have a question about the 5.0 and is the answer not in the manual?
Questions and answers