This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes PHP and the fly likes When to use mysql_fetch_array() Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Languages » PHP
Reply locked New topic
Author

When to use mysql_fetch_array()

Deepthi Tanguturi
Greenhorn

Joined: Sep 06, 2011
Posts: 17
When to use mysql_fetch_array() and When to use mysql_fetch_row()
Aniket S. Kulkarni
Ranch Hand

Joined: Jun 15, 2011
Posts: 86

mysql_fetch_array():The mysql_fetch_array() function returns a row from a recordset as an associative array and/or a numeric array.

This function gets a row from the mysql_query() function and returns an array on success, or FALSE on failure or when there are no more rows.

mysql_fetch_row():The mysql_fetch_row() function returns a row from a recordset as a numeric array.

This function gets a row from the mysql_query() function and returns an array on success, or FALSE on failure or when there are no more rows.


Aniket Kulkarni
Oracle Certified Professional, Java SE 6 Programmer.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5536

This seems to be a duplicate question:
http://www.coderanch.com/t/555610/PHP/Incubator/Difference-between-mysql-fetch-array


JBoss In Action
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: When to use mysql_fetch_array()
 
Similar Threads
Using a Variable with AJAX
Spring
Difference between mysql_fetch_array() and mysql_fetch_row()
jqGrid with jsp server side
Javascript and PHP