![]() |
|
首页 │ Apache │ Linux│ Java│ MySQL│ 注册│帮助 | |||
我有个php程序:
$ls_sql = ' create temporary table temps ';
$ls_sql .= ' select * from stwz ';
$ls_sql .= " where sttp='some' and wzsign=1 order by stid desc limit 10 ";
$res = mysql_query($ls_sql, $connect);
$table=temps; //表名称
$perpage=18; //每页显示文章数目
$query="SELECT COUNT(*) AS rcnt FROM $table";
$result=mysql_query($query, $connect);
echo "result =" . $result; // test. 结果是result为空,什么值都没有![/COLOR]
$data=mysql_fetch_array($result);
运行环境是apache2.0.45+php-4.3.2(AS3U2)
运行的时候出错:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /opt/article2.php on line 98
但这个程序在另外一个系统上运行正常:
运行环境是:AS2.1。apache2.0.49+php-4.3.6。
由于现在要把系统由AS2.1移植到AS3U2,所以出现了这个问题,请大虾们帮帮忙,看是什么问题?
我都晕了半天了!找不出答案!
说明:php编译的mysql都是4.0.x的版本!数据库的连接没有问题。

