Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Difference between MYSQL_ASSOC,MYSQL_NUM and MYSQL_BOTH ?

Answer Posted / avanthi g

Fetch a result row as an associative array, a numeric array, or both
Returns an array that corresponds to the fetched row and moves the internal data pointer ahead.

Example:
MYSQL_NUM returns a numerically indexed array.
$row = mysql_fetch_array($result, MYSQL_NUM);
echo $row[0];

MYSQL_ASSOC returns an associative array.
$row = mysql_fetch_array($result, MYSQL_ASSOC);
echo $row["student_id"];

MYSQL_BOTH returns both.
$row = mysql_fetch_array($result, MYSQL_BOTH)
echo $row[0]." ".$row["name"];

Is This Answer Correct ?    46 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is 'mysqlimport'?

875


How do I install mysql on windows 10?

928


How to use case expression?

904


What is meant by decimal (5,2)?

970


How to use triggers to track changes in mysql?

827


What are the advantages of MySQL when compared with Oracle?

886


What is offset limit?

912


Is mysql a server or database?

849


How to filter data from a mysql database table with php?

839


table a has records 1,1,1,1 table b has records 1,1,1,1,1,1 what would be out if perform join for all cases

1287


What is the full meaning of mysql?

921


What is mysql enterprise edition?

855


What is the hostname for mysql database?

957


what is database black box testing? : Mysql dba

1060


How do I find mysql database?

864