How to use mysql fetch row in PHP
In this article I am going to explain about mysql_fetch_row function in PHP.
PHP mysql_fetch_row() Function
The PHP mysql_fetch_row function is used to eturns a row from a recordset as an object.
Syntax of mysql_fetch_row function
Parameters in mysql_fetch_row function
It has only one parameter:
Parameter |
Description |
data |
It specifies which data pointer to use. |
Example of mysql_fetch_row function
<?php
$con=mysql_connect("localhost","gupta","sharad");
if(!$con)
{
die("Could not connect:".mysql_error());
}
$database=mysql_select_db("Mcn_Solution", $con);
$res=mysql_query("select * from Emp");
print_r(mysql_fetch_row($res));
mysql_close($con);
?>
|
Output:

You may also want to read these related articles :here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here