Home  >  Article  >  php教程  >  mysql_field_name ½Ì³Ì

mysql_field_name ½Ì³Ì

WBOY
WBOYOriginal
2016-06-13 10:07:191147browse

mysql_field_name ÊÇ·µ»Ø$resultµÄÃû×Ö,³É¹¦¾Í·µ»ØÖµ,·ñÔò¾ÍÊÇfalse;

mysql_field_name(data,field_offset)
²ÎÊý:
field_offset:¿ªÊ¼Î»ÖÃ
data:±ØÑ¡Ïî ,ÊÇÖ¸mysql_query²éѯ·µ»ØµÄÖµ.
ºÃÁËÎÒÃÇÀ´¿´¿´mysql_field_nameµÄʵÀý°É.

$sql = "SELECT * from Person";
$result = mysql_query($sql,$con);
$name = mysql_field_name($result, 0);
echo $name;
 
?>
½á¹û.
LastName
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn