What are the differences between MySQL_fetch_array(),
MySQL_fetch_object(), MySQL_fetch_row()?
Answers were Sorted based on User's Feedback
Answer / amita
mysql_fetch_object will return result from database as
objects i.e. $result->name
mysql_fetch_array will fetch result row as an associative
array or numeric array or both with the help of mysql_NUM or
mysql_ASSOC option.
eg: $result[0] ,$result['name']
mysql_fetch_row will fetch result row as an numeric array.
eg: $result[0]
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / vel
when u r using mysql_fetch_object i will first matching
record.
u can access the result set by column name of that record.
when u r using mysql_fetch_array i will fetch all the
matching records from the table.
u can access the result set by index as well as colum name
of that record.
| Is This Answer Correct ? | 3 Yes | 0 No |
What language is used in mysql?
How do I run a query in mysql?
What do I do if I forgot my mysql root password?
how fastest access of data can be done from database ?
What could be the reason that the mysql statement 'select avg (salary) from emp' generates an inaccurate output?
Is mysql a distributed database?
What is mysql data directory? How to determine the location of the data directory?
SQL: 1. Write a queryto retrieve the author who was published a book at the youngest age? 2. write a query to retrieve the no. of books published a each year in various languages? 3. write a query to retrieve no. of books published by them only those authors who have published more than 1 book? 4. write a query to retrieve who has not published any books during the year 2006? 5. write a query to retrieve the authors who has published any books during the birth date write this query in 2 ways 1)joins 2)sub query 6. write a query to retrieve all the books which was published during jan 2007 & title containing India or published in the language hindi? 1. table name is liberary managemnt and two column is there one is authors and another one is books . 2.four fields will comes under authours like nationality, birthdate ,first-language,second-language 3.four fields will comes under books like authour,title ,language,publish date to write query using this details
what programming language which is used for testing and developement in sql?
What is pragma exception?
Does mysql need a server?
What is the difference between mysql_fetch_array() and ysql_fetch_object() ?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)