MYSQL_SET_CHARSET(3) 1 MYSQL_SET_CHARSET(3)mysql_set_charset - Sets the client character setSYNOPSIS
Warning
This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQL extension should
be used. See also MySQL: choosing an API guide and related FAQ for more information. Alternatives to this function include:
omysqli_set_charset(3)
oPDO: Add
charset to the connection string, such as charset=utf8
bool mysql_set_charset (string $charset, [resource $link_identifier = NULL])
DESCRIPTION
Sets the default character set for the current connection.
o $charset
- A valid character set name.
o $
link_identifier -The MySQL connection. If the link identifier is not specified, the last link opened by mysql_connect(3) is
assumed. If no such link is found, it will try to create one as if mysql_connect(3) was called with no arguments. If no connection
is found or established, an E_WARNING level error is generated.
Returns TRUE on success or FALSE on failure.
Note
This function requires MySQL 5.0.7 or later.
Note
This is the preferred way to change the charset. Using mysql_query(3) to set it (such as SET NAMES utf8) is not recommended. See
the MySQL character set concepts section for more information.
mysql_client_encoding(3), Setting character sets in MySQL, List of character sets that MySQL supports.
PHP Documentation Group MYSQL_SET_CHARSET(3)
Check Out this Related Man Page
MYSQL_GET_HOST_INFO(3) 1 MYSQL_GET_HOST_INFO(3)mysql_get_host_info - Get MySQL host infoSYNOPSIS
Warning
This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQL extension should
be used. See also MySQL: choosing an API guide and related FAQ for more information. Alternatives to this function include:
omysqli_get_host_info(3)
o PDO::getAttribute
string mysql_get_host_info ([resource $link_identifier = NULL])
DESCRIPTION
Describes the type of connection in use for the connection, including the server host name.
o $
link_identifier -The MySQL connection. If the link identifier is not specified, the last link opened by mysql_connect(3) is
assumed. If no such link is found, it will try to create one as if mysql_connect(3) was called with no arguments. If no connection
is found or established, an E_WARNING level error is generated.
Returns a string describing the type of MySQL connection in use for the connection or FALSE on failure.
Example #1
mysql_get_host_info(3) example
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
printf("MySQL host info: %s
", mysql_get_host_info());
?>
The above example will output something similar to:
MySQL host info: Localhost via UNIX socket
mysql_get_client_info(3), mysql_get_proto_info(3), mysql_get_server_info(3).
PHP Documentation Group MYSQL_GET_HOST_INFO(3)
I want to design a database, using mysql as a backend, and PHP as the frontend, I wanna be able to easily build forms in PHP to communicate with MySQL, is there any programs that will allow this, I really dont want to program all the forms by hand..
thankyou (2 Replies)
Okay, I'm new to this PHP and MySQL stuff, so help would be VERY much appreciated. :)
On my iMac runnning Panther, it has MySQL and PHP installed.
Yet when I view a PHP file from the iMac or another computer at my house, I get the source code.
What's wrong? (11 Replies)
Hey guys, does anyone know how I edit, configure the server settings using the terminal? MySQL and PHP was once working.
But after frying the Xserve G5 i'm in the middle of rebuilding everything, I believe i need to re-configure the root document directory...
but have forgotten how to edit... (1 Reply)
I am moving from a shared hosting environment to a dedicated box. The migration also involves a mySQL database managed using a web-based PHP interface.
I can read the contents of the db (connection is good) but when I try to administer, the form variables aren't going from step 1 (add) to step 2... (0 Replies)
Someone please help me with MySQL. I have a field in the table that contains the UNIX timestamp. Using PHP, I can format that timestamp in any way I like.
Now, I want to fetch rows for a particular date. For example, all rows having timestamp equivalent to 11th November 2007 or all rows having... (1 Reply)
Thank you for choosing this thread to read.
I am about to develop a heavy set financial system. My client wants to build his own in-house. Due to my LAMP/BSD mind set, I know MySQL, but no other database (never got the chance to see others). I do not know if MySQL can handle 2000 to 5000 records... (3 Replies)
A few weeks ago at the recommendation of people I trust, I bought and started reading Kernighan and Ritchie's (K&R) C Programming Language. For one thing, it's damn thin compared to the O'Reilly Practical C I just finished last month. It covers generally the same stuff but in a much more... (9 Replies)
I am trying to learn how to install HORDE for work and I found this link:
Installing Horde on Centos 5.x - William Lindley - wlindley.com
I am at this step now:
You'll need to use the MySQL root password. Then, in your database administration screen for MySQL, set the password for the new... (2 Replies)
Hi,
SLES11 : I've installed the following MySQL Package:
MySQL-client-community-5.1.54-1.sles11.x86_64
MySQL-devel-community-5.1.54-1.sles11.x86_64
MySQL-server-community-5.1.54-1.sles11.x86_64
MySQL-shared-community-5.1.54-1.sles11.x86_64Problem: I don't see any my.cnf file (find / -name... (1 Reply)
Hi,
I'm on a Raspberry Pi with Raspbian Wheezy.
I urgently need to get MySQL running with PHP, but I get an error.
For example:
$con=mysql_connect("127.0.0.1","root","******","ids");
gives
PHP Fatal error: Call to undefined function mysql_connect()
So, I found I needed to install some... (2 Replies)