|
本帖最后由 x171306523c 于 2012-7-16 14:23 编辑
PHP复制代码
function search (){
$selectsql="select * from soft where title like '%$key[0]%'";
//执行输出列表
$result=$this->db->query($selectsql);
while ($row=mysql_fetch_array($result)) {
for ($j = 0; $j < 5; $j++) {
$row[title ]=preg_replace("/($key[$j])/i", " <span style=\"color:#F00\"><b>\\1</b></span>", $row[title ]);
}
return $row[title ];
}
}
复制代码
while ($row=mysql_fetch_array($result)) 报错,提示 mysql_fetch_array(): supplied argument is not a valid MySQL result resource
如何修改,我是CI新手
|
|