mysql_result():提供的参数是不是一个有效的MySQL结果资源ðConjunction.php上线132 $num=mysql_result($result, 0); 这个就是132 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 mysql_result()的第一个参数$result是mysql_query()返回的结果。因此推断是SQL查询语句有问题,把你的SQL输出后贴上来吧 mysql_result — 取得结果数据说明mixed mysql_result ( resource $result , int $row [, mixed $field ] )mysql_result() 返回 MySQL 结果集中一个单元的内容。字段参数可以是字段的偏移量或者字段名,或者是字段表点字段名(tablename.fieldname)。如果给列起了别名('select foo as bar from...'),则用别名替代列名。当作用于很大的结果集时,应该考虑使用能够取得整行的函数(在下边指出)。这些函数在一次函数调用中返回了多个单元的内容,比 mysql_result() 快得多。此外注意在字段参数中指定数字偏移量比指定字段名或者 tablename.fieldname 要快得多。调用 mysql_result() 不能和其它处理结果集的函数混合调用。Example #1 mysql_result() 例子<?php $link = mysql_connect("localhost", "mysql_user", "mysql_password") or die("Could not connect: " . mysql_error()); $result = mysql_query("SELECT name FROM work.employee") or die("Could not query: . mysql_error()); echo mysql_result($result,2); // outputs third employee's name mysql_close($link);?>推荐使用高性能的替代函数:mysql_fetch_row(),mysql_fetch_array(),mysql_fetch_assoc() 和 mysql_fetch_object()。 IIS下安装PHP5.4出现无法连接mysql数据库 不可使用数据库,请检查数据库是否存在、用户是否有权访问该数据库 各位能帮忙解释一下,下面的代码,有些我在帮助里找的到,有的找不到 语句拼装问题 strtotime("2010-02-02日")会返回什么? 免费教学视频,望大家能有所收获!!!!!!!!! [100分较难] FreeBSD下PHP实现以HTML方式查看XLS flv 上传/取不到任何信息 mysql修改密码后的问题 我看到很多的新闻系统里面都有关键字功能 如何防SQL注入啊,有没现成的类啊? php中执行linux命令失败?
因此推断是SQL查询语句有问题,把你的SQL输出后贴上来吧
mysql_result — 取得结果数据说明mixed mysql_result ( resource $result , int $row [, mixed $field ] )
mysql_result() 返回 MySQL 结果集中一个单元的内容。字段参数可以是字段的偏移量或者字段名,或者是字段表点字段名(tablename.fieldname)。如果给列起了别名('select foo as bar from...'),则用别名替代列名。当作用于很大的结果集时,应该考虑使用能够取得整行的函数(在下边指出)。这些函数在一次函数调用中返回了多个单元的内容,比 mysql_result() 快得多。此外注意在字段参数中指定数字偏移量比指定字段名或者 tablename.fieldname 要快得多。调用 mysql_result() 不能和其它处理结果集的函数混合调用。Example #1 mysql_result() 例子
<?php
$link = mysql_connect("localhost", "mysql_user", "mysql_password")
or die("Could not connect: " . mysql_error()); $result = mysql_query("SELECT name FROM work.employee")
or die("Could not query: . mysql_error()); echo mysql_result($result,2); // outputs third employee's name mysql_close($link);
?>
推荐使用高性能的替代函数:mysql_fetch_row(),mysql_fetch_array(),mysql_fetch_assoc() 和 mysql_fetch_object()。