Results 1 to 6 of 6
-
04-05-2011, 05:41 AM #1
Freshman
- Join Date
- Mar 2011
- Posts
- 10
- Thanks
- 0
- Thanked 0 Times in 0 Posts
- Feedback Score
- 0
what is the use of mysql_fetch_array?
what is the use of mysql_fetch_array?
-
07-21-2011, 01:43 PM #2
Freshman
- Join Date
- Apr 2010
- Posts
- 40
- Thanks
- 0
- Thanked 1 Time in 1 Post
- Feedback Score
- 0
mysql_fetch_array is a PHP function to retrieve row of data as an array from mysql database.
Example
PHP Code:$query="SELECT* FROM user WHERE id=5";
$result = mysql_query($query);
$row = @mysql_fetch_array($result, MYSQL_ASSOC);
//$row is an associative array holding user data where user id = 5
-
04-13-2012, 05:27 AM #3
Sophomore
- Join Date
- Mar 2012
- Posts
- 144
- Thanks
- 0
- Thanked 1 Time in 1 Post
- Feedback Score
- 0
what is the use of mysql_fetch_array?
mysql_fetch_array is mysql query .it is used to fetch the record from tha database. with help of this query you may run the data...
-
05-25-2012, 01:11 AM #4
Example mysql_fetch_array() with MYSQL_NUM
<?php
mysql_connect("localhost", "mysql_user", "mysql_password") or
die("Could not connect: " . mysql_error());
mysql_select_db("mydb");
$result = mysql_query("SELECT id, name FROM mytable");
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
printf("ID: %s Name: %s", $row[0], $row[1]);
}
mysql_free_result($result);
?>
-
08-08-2012, 05:57 AM #5
Freshman
- Join Date
- Aug 2012
- Posts
- 12
- Thanks
- 0
- Thanked 0 Times in 0 Posts
- Feedback Score
- 0
mysql_fetch_array is a PHP function to retrieve row of data as an array from mysql database.
-
09-11-2012, 08:16 AM #6
it retrieve rows one by one from the result set.......



Reply With Quote

