PHP Tutorial : Extracting rows from mysql

Helllooooooo,
In latest two posts I have shown you how to connect to a mysql database via PHP, and in another one I teach you how to select rows from a mysql database table. In this one I will show you how to extract that rows from mysql and print them out into a page. Let’s suppose we have a database which contains fields : id, full_name, age. Ok, next step is connecting to db, then making a query to select those fields and finally extract & print them on the screen :

We used a while() loop to extract all results!

Isn’t PHP rocking?

Tagged with: , , , , , , , , ,
Posted in Php & MySQL
2 comments on “PHP Tutorial : Extracting rows from mysql
  1. bogdan says:

    Would have been worth it to mention the other option: mysql_fetch_array. After all, everyone learns basic programming first and then the concept of OOP and how to work with it.

  2. admin says:

    ok, appreciate your advice but honestly it’s my blog and I make the rules here

Leave a Reply

Your email address will not be published. Required fields are marked *

*