Leakbali
w3 Tutorial, Web Tutorial
Register   Login
Share

MySQL Fetch Array 


MySQL doesn't have a Fetch Array function. mysql_fetch_array is actually a PHP function that allows you to access data stored in the result returned from a successful mysql_query. If you have been jumping around our MySQL Tutorial then you would have already seen this function popping up all over the place.

This lesson will teach you how and why to use mysql_fetch_array in your PHP Scripts.

Do you know what is returned when you used the mysql_query function to query a MySQL database? It isn't something you can directly manipulate, that is for sure. Here is a sample SELECT query of a table we created in the MySQL Create Table page.

MySQL Fetch Array PHP and MySQL Code

<?php
$result = mysql_query("SELECT * FROM example");
?>
The value that mysql_query returns and stores into $result is a special type of data, it is a MySQL Resource. Additional PHP functions are required to extract the data from this Resource.
More Tutorial
  1. MYSQL - MySQL Fetch Array
  2. MYSQL - A Row of Data
  3. MYSQL - Getting a Row of Data using mysql_fetch_array
  4. MYSQL - Fetch Array While Loop

References

About Us

Home
About Us
Contact Us
Sitemap

Tools

Google PageRank
Alexa Rank
Keywords Density

Accounts

Register Account
Login
Valid XHTML 1.0 TransitionalValid CSS!
Web Directory


2006 - 2012 © Leakbali.com - Free Web Tutorial, Free Web Articles, Web Sharing, Source Codes, Web References