The function of mysql_fetch_lengths is to judge the length of mysql_fetch_array (), Mysql_fetch_assoc (), mysql_fetch_object () or mysql_fetch_row (), if Success returns an exhibition, otherwise it returns false;
Mysql_fetch_lengths's syntax.
Mysql_fetch_lengths (data)
Parameters.
Data: Required is the value returned by mysql_query
Let's take a look at the example.
$sql = "SELECT * from the person WHERE lastname= ' refsnes '";
$result = mysql_query ($sql, $con);
Print_r (Mysql_fetch_row ($result));
Print_r (Mysql_fetch_lengths ($result));
?>
Output results.
Array ([0] = refsnes[1] = Kai jim[2] = taugata 2[3] = 22)
Array ([0] = 7[1] = 7[2] = 9[3] = 2)
http://www.bkjia.com/PHPjc/630896.html www.bkjia.com true http://www.bkjia.com/PHPjc/630896.html techarticle The role of mysql_fetch_lengths is to judge the length of mysql_fetch_array (), Mysql_fetch_assoc (), mysql_fetch_object () or mysql_fetch_row () The degree, if successful returns a ...