[請益] php的問題
function get_tenant_list()
{
$link = mysql_pconnect("localhost", "xxxxx", "xxxxx");
mysql_select_db ("xxxxx", $link) ;
$sql = "select * from houses where type_='上架' ";
$ret = mysql_query($sql, $link) ;
$rec=array(
array(),array()
);
$a1=0;
51行 while($value = mysql_fetch_array( $ret))
{
$rec[$a1][0]=$value[0];
$rec[$a1][1]=$value[2];
$a1++;
}
mysql_close ($link) ;
return $rec;
}
function get_tenant_un()
{
$link = mysql_pconnect("localhost", "xxxxx", "xxxxxx");
mysql_select_db ("xxxxxx", $link) ;
$sql = "select * from houses where type_='上架' ";
$ret = mysql_query($sql, $link) ;
$a1=0;
71行 while($value = mysql_fetch_array( $ret))
{
$a1++;
}
mysql_close ($link) ;
return $a1;
}
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in C:\AppServ\www\show_tenant.php on line 51
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in C:\AppServ\www\show_tenant.php on line 71
請大大能否幫我看一下那裡出了問題,謝謝。
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 163.21.78.223
→
11/13 14:05, , 1F
11/13 14:05, 1F
→
11/13 14:06, , 2F
11/13 14:06, 2F
推
11/13 14:32, , 3F
11/13 14:32, 3F
推
11/13 14:37, , 4F
11/13 14:37, 4F
推
11/13 14:43, , 5F
11/13 14:43, 5F
推
11/13 15:12, , 6F
11/13 15:12, 6F
討論串 (同標題文章)
PHP 近期熱門文章
PTT數位生活區 即時熱門文章