Tagged: mysql

How to change the collation for MySQL database to UTF-8?

How to change the collation for MySQL database to UTF-8?

Changing the collation for all tables in a MySQL database can be time consuming depending on how many tables you have.  That’s why we recommend using the following PHP script for changing the collation for all tables at a time: <?php $db = mysql_connect(‘localhost’,’DBUserName’,’DBPassword’); if(!$db)...

Creating Custom Error Messages in Apache

Creating Custom Error Messages in Apache

Introduction The .htaccess file is a file found in Apache servers that allows you to manipulate the behaviour of the server. A very common use is to create custom error messages for server errors. Examples of such errors are “404 Not Found” (say when you...

Unicode Data with PHP 5 and MySQL 4.1

Unicode Data with PHP 5 and MySQL 4.1

Unicode background In the ever expanding world of e-commerce and information technology, one thing above all is coming to the forefront of internet design – globalization. For many large companies, web documents are translated into many different languages. However, the computer technologies we use for...

How to – Using PHP To Backup MySQL Database

How to – Using PHP To Backup MySQL Database

There are at least three ways to backup your MySQL Database : Execute a database backup query from PHP file. Run mysqldump using system() function. Use phpMyAdmin to do the backup. Execute a database backup query from PHP file Below is an example of using...