<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >msql_result</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="PHP 手册" HREF="index.html"><LINK REL="UP" TITLE="mSQL Functions" HREF="ref.msql.html"><LINK REL="PREVIOUS" TITLE="msql_regcase" HREF="function.msql-regcase.html"><LINK REL="NEXT" TITLE="msql_select_db" HREF="function.msql-select-db.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP 手册</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.msql-regcase.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.msql-select-db.html" ACCESSKEY="N" >下一页</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.msql-result" ></A >msql_result</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN131035" ></A ><P > (PHP 3, PHP 4, PHP 5)</P >msql_result -- Get result data</DIV ><DIV CLASS="refsect1" ><A NAME="AEN131038" ></A ><H2 >说明</H2 >string <B CLASS="methodname" >msql_result</B > ( resource result, int row [, mixed field] )<BR ></BR ><P > <B CLASS="function" >msql_result()</B > returns the contents of one cell from a mSQL result set. </P ><P > When working on large result sets, you should consider using one of the functions that fetch an entire row (specified below). As these functions return the contents of multiple cells in one function call, they are often much quicker than <B CLASS="function" >msql_result()</B >. </P ><P > Recommended high-performance alternatives: <A HREF="function.msql-fetch-row.html" ><B CLASS="function" >msql_fetch_row()</B ></A >, <A HREF="function.msql-fetch-array.html" ><B CLASS="function" >msql_fetch_array()</B ></A >, and <A HREF="function.msql-fetch-object.html" ><B CLASS="function" >msql_fetch_object()</B ></A >. </P ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN131060" ></A ><H2 >参数</H2 ><P > <P ></P ><DIV CLASS="variablelist" ><DL ><DT ><CODE CLASS="parameter" > result</CODE ></DT ><DD ><P >返回类型为 <A HREF="language.types.resource.html" ><B CLASS="type" >resource</B ></A > 的结果集。该结果集从 <A HREF="function.msql-query.html" ><B CLASS="function" >msql_query()</B ></A > 的调用中得到。</P ></DD ><DT ><CODE CLASS="parameter" >row</CODE ></DT ><DD ><P > The row offset. </P ></DD ><DT ><CODE CLASS="parameter" >field</CODE ></DT ><DD ><P > Can be the field's offset, or the field's name, or the field's table dot field's name (tablename.fieldname.). If the column name has been aliased ('select foo as bar from ...'), use the alias instead of the column name. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >注意: </B > Specifying a numeric field offset is much quicker than specifying a fieldname or tablename.fieldname. </P ></BLOCKQUOTE ></DIV ></DD ></DL ></DIV > </P ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN131083" ></A ><H2 >返回值</H2 ><P > Returns the contents of the cell at the row and offset in the specified mSQL result set. </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.msql-regcase.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >起始页</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.msql-select-db.html" ACCESSKEY="N" >下一页</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >msql_regcase</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.msql.html" ACCESSKEY="U" >上一级</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >msql_select_db</TD ></TR ></TABLE ></DIV ></BODY ></HTML >