Posted by Shek on June 10, 2009 under PHP |
Editor’s note: In some cases, when you have forgotten to preset the MySQL database table encoding to UTF8 after the creation of the database but later you need to insert some UTF8 text such as Chinese or other Asian languages, here is how you could do with PHP to change the encoding of the MySQL database table.
Read more of this article »
Posted by Shek on December 28, 2008 under PHP |
Array is a good way to store many elements, in some operations you might like to store all of the array elements into different row of a table in a MySQL database. To store into different row, we can use a for loop to go through each elements and run a query to insert them 1 by 1. This example, I go show you to insert into different fields.
Read more of this article »
Posted by Shek on November 23, 2008 under PHP |
Editor’s note: I mentioned in my previous post
Display data from MySQL with PHP which I demonstrated how to display the data of a row within a table, now I want to demonstrate how to display all field names (column names) of a table within a MySQL database.
Read more of this article »
Posted by Shek on November 16, 2008 under PHP |
To find and print out the number of column (field) of a table in MySQL database, we have to use a php function “mysql_num_fields()” to get the number and to use a variable to store the result, here I have created an example to demonstrate how to do so:
Read more of this article »
Posted by Shek on August 20, 2008 under MySQL |
To import Excel data into the MySQL database’s table is easy. All you have to do is to save the Excel file as “CSV” Format, and use phpmyadmin to complete the job for you. Here I have create an example to show you how to do so:
Read more of this article »
Posted by Shek on June 30, 2008 under PHP |
Editor’s note: In some cases, you might like to check how many records in the MySQL database which matches the query you entered. Case such as a login system where you want to check if there is a record matches the user name and the password inputted , here is an example
Read more of this article »