SQL – join 2 mysql tables and get data result from them

Posted by Shek on March 16, 2011 under MySQL | Be the First to Comment

In this post, I am going to talk about how to get data from 2 mysql tables instead of 1 table with a sql.

Here are 2 mysql tables (The field types are ignored in this examples): Read more of this article »

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 »

Check how many record in the MySQL database matches the query

Posted by Shek on June 30, 2008 under PHP | Be the First to Comment

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 »

Get MySQL database records as HTML form text field’s value

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

In my past post on explaining how to set the default values of the text field. Now to use the same concept, we could get the records from the MySQL database and place it into the text field as default text. Here I have created an example to show you how to do so. Read more of this article »

Empty a table in MySQL database with HTML form and PHP

Posted by Shek on May 18, 2008 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 »

MD5 – insert an encrypted string or password to the MySQL database with HTML form and PHP

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

Editor’s note: In a login system, there are user names and passwords stored in the MySQL database. The passwords are normally stored as strings inside the database. To have a more security way to store the passwords in the database, it is better to store an encrypted version of the password, therefore only the password creator knows what the password is.

MD5 is the encryption technology I like to use because it is very easy to implement and it encrypts a string into a 32-character strings, for reference what MD5 really is, please check Wikipedia-MD5.

Read more of this article »

Page 1 of 3123