Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mysql_set_charset(3) [php man page]

MYSQL_SET_CHARSET(3)							 1						      MYSQL_SET_CHARSET(3)

mysql_set_charset - Sets the client character set

SYNOPSIS
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_SERVER_INFO(3)						 1						  MYSQL_GET_SERVER_INFO(3)

mysql_get_server_info - Get MySQL server info

SYNOPSIS
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_server_info(3) o PDO::getAttribute string mysql_get_server_info ([resource $link_identifier = NULL]) DESCRIPTION
Retrieves the MySQL server version. 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 the MySQL server version on success or FALSE on failure. Example #1 mysql_get_server_info(3) example <?php $link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); if (!$link) { die('Could not connect: ' . mysql_error()); } printf("MySQL server version: %s ", mysql_get_server_info()); ?> The above example will output something similar to: MySQL server version: 4.0.1-alpha mysql_get_client_info(3), mysql_get_host_info(3), mysql_get_proto_info(3), phpversion(3). PHP Documentation Group MYSQL_GET_SERVER_INFO(3)
Man Page

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

PHP and MySQL

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)
Discussion started by: kwalick
2 Replies

2. Shell Programming and Scripting

Problem with PHP and MySQL

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)
Discussion started by: Danny_10
11 Replies

3. OS X (Apple)

Webserver Setup, need help!

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)
Discussion started by: hype.it
1 Replies

4. UNIX for Dummies Questions & Answers

PHP-MySQL: POST issue

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)
Discussion started by: adrious
0 Replies

5. UNIX for Dummies Questions & Answers

Timestamp in MySQL

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)
Discussion started by: nervous
1 Replies

6. UNIX and Linux Applications

What Database engine would you recommend?

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)
Discussion started by: sad_angle
3 Replies

7. Programming

C Beginner Looking For Suggestions

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)
Discussion started by: deckard
9 Replies

8. UNIX for Dummies Questions & Answers

Horde Installation Woes for Centos 5.x

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)
Discussion started by: mojoman
2 Replies

9. UNIX and Linux Applications

MySQL missing my.cnf

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)
Discussion started by: hiddenshadow
1 Replies

10. Web Development

Can't Install MySQL with PHP

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)
Discussion started by: FreddoT
2 Replies