PHP – PHP 5.3 Repository for CentOS from Webtatic.com

Webtatic.com provides its own repository. If you want to get the latest packages such as PHP and MySQL, you can consider adding it to your yum repo by the following steps.

1. Add the yum repository information

  • rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm

Continue reading

MySQL – Data Type Conversion

Sometimes we need to convert the selected data into other content type. Here is an example.

Assume we got a table with a VARCHAR column which stores number only.

mysql> SELECT * FROM demo;
+----------+
| a_string |
+----------+
| 1        |
| 2        |
| 3        |
| 4        |
| 5        |
| 6        |
| 7        |
| 8        |
| 9        |
| 10       |
| 11       |
| 12       |
| 13       |
+----------+
13 rows in set (0.00 sec)
Continue reading

MAMP – Introduction

MAMP is Apache, MySQL and PHP runs on Mac. For Mac users, it is very convenient to use the MAMP package such that they don’t need to install the those application one by one. Moreover, MAMP package also bundled with some other useful programs as well as libraries such as phpMyAdmin and the PHP GD library. For more information, you can refer to the MAMP website.

During the installation, you can include the MAMP control panel into you Mac Dashboard. This is quite helpful for you to start and stop the server. you can also pick either PHP4 or PHP5 by switching to the back panel by clicking the i button which is located under the Apache label on the front panel.
                                                                        Continue reading