For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > May 2007 > Re: [PHP-DB] Where does the mysqli extension find the default connection









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] Where does the mysqli extension find the default connection
Georg Richter

2007-05-02, 6:57 pm

Jean-Noël Rivasseau wrote:
> Hello there,
>
> I'd like to know which configuration file or setting is used by PHP mysqli
> extension to know the default charset connection to the database.


mysqli (and also mysql) extension uses the default character set for
libmysql This can be package dependend: Several distros deliver utf8 as
default, others latin1.

To be on the safe side, you should call mysqli_set_charset($link,
"utf8/latin1/whatever) to set the character set for each connection.

/Georg
--
Georg Richter, Development Manager - Connectors & Client Connectivity
MySQL GmbH, Radlkoferstr. 2, D-81373 München, www.mysql.com
Geschäftsführer: Hans von Bell, Kaj Arnö - HRB München 162140
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com