What is mysql result in PHP

In this article I am going to explain about mysql_result function in PHP.
  • 1572

PHP mysql_result() Function

The PHP mysql_result function is used to returns the value of a field in a recordset.

Syntax of mysql_result function

mysql_result(data, row, field)

Parameters in mysql_result function

It have three parameter:

Parameter Description
data It specifies which result handle to use.
row It specifies the row number from the result that is being retrieved.
query It specifies the name or offset of the field being retrieved.

Example of mysql_result function





die("Could not connect:".mysql.error());



$res=mysql_query("select * from emp",$con);

echo mysql_result($res,0);





You may also want to read these related articles :

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here


More Articles

© 2020 DotNetHeaven. All rights reserved.