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 |
Can you tell the difference between mysql_connect and mysql_pconnect? : Mysql dba
What is mysql data directory? How to determine the location of the data directory?
What is the difference between BLOB AND TEXT?
Why MySQL is used?
I have a table like this tblData (month int,Qty int) and i am inserting three rows in this table 1.tblData Values (1,100) 2.tblData Values (2,200) 3.tblData Values (3,300) The Result I want is the Running total of the field Qty that is 1 100 100 2 200 300 3 300 600 What is the Query for that ?
How to create table show example
How to include comments in sql statements?
Can mysql and mariadb coexist?
How do I edit a stored procedure in mysql?
What is MySQL Stored Procedure?
How to display top 50 rows?
how to repair a table in mysql?