In this tutorial you will learn how to select data from MySQL using
MySQLi in php.
The SELECT statement is used to select data from one or more tables:
SELECT * FROM tablename;
Example of MySQLi(object-oriented)
In the example firstly, we checked the database connection. If
database connection is successful then the SQl query selects the id, name, email from user_info table and puts the results into a
variable called $res.
The function num_rows() checks the number of rows returned is more than 0 or not. If so then the data_seek() funtion adjusts the result pointer to an arbitrary row in the result-set.
The fetch_assoc() function puts the results into an associative
array. The while() loop loops through the array and outputs the
results from the id, name, email columns.
For more information, check out the website:
http://tut.julfi.com/category/php/
You can follow us on facebook:
/ 360969907396820
Follow us on google+:
https://plus.google.com/1072194777499...
Follow us on Twitter:
/ julfitut
Follow us on pinterest:
/ julfitutorials
On this page of the site you can watch the video online PHP Tutorial - select data from MySQL using MySQLi (PHP For Beginners) with a duration of hours minute second in good quality, which was uploaded by the user Julfi Tutorials 12 January 2015, share the link with friends and acquaintances, this video has already been watched 2,574 times on youtube and it was liked by 7 viewers. Enjoy your viewing!