Display all field (column) names of a table in MySQL database

Posted by Shek on November 23, 2008 under PHP | Be the First to Comment

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 »

Copy one table’s field records into another table’s field in MySQL database with PHP

Posted by Shek on May 22, 2008 under PHP | Read the First Comment

Editor’s note: In some cases such as a login system or other company’s stock count system which the records in the MySQL database might need to update very frequently. There might be a need to create another tables to backup monthly of the data to another table in the MySQL database. It is a good idea to copy one table’s field records to another table’s field.
Read more of this article »

Create a HTML form with PHP for loop and table

Posted by Shek on May 18, 2008 under PHP | 2 Comments to Read

Editor’s note: To create a HTML form with just a few text fields and a few HTML form elements is easy, but in a stock control system or price input system for example, there might be a need for many text fields and different HTML form elements repeatedly appear in the HTML form. To type in the codes of all of them will take too much time. Therefore a PHP for loop and a table is good for this task.
Read more of this article »

Empty a table in MySQL database with HTML form and PHP

Posted by Shek on under PHP | Be the First to Comment

Editor’s note: In some cases which the user might need to empty a table in the MySQL database. Instead of deleting every record in the MySQL database, you could run a query “truncate table ‘tablename’” to do the job.
Read more of this article »

HTML form in a table

Posted by Shek on May 17, 2008 under HTML | Be the First to Comment

Sometimes, you might like to have the HTML looks neat and tidy. A table to hold all of the HTML elements in it would do the job. Here I have created an example to show you a good way to do it.
Read more of this article »

Create MySQL database table with PHP

Posted by Shek on May 11, 2008 under PHP | Be the First to Comment

Editor’s note: To create a MySQL database table with PHP is very straight forward, all you have to do is to know the query for creating the MySQL database table, and use PHP function mysql_query( ) to run that query. You could also use a HTML form to let the user to input the name of the table.

Read more of this article »

Page 2 of 212