【发布时间】:2017-04-18 12:16:46
【问题描述】:
根据搜索模式,我需要从服务器获取显示的数据。
include("dbconfig.php");
$sql="select * from blog where title LIKE '{$title}%'";
$res=mysql_query($sql);
while($row=mysql_fetch_array($res))
{
echo"<tr>";
echo"<td><img src='uploads/".$row['file']."' height='150px' width='200px'</td>";
echo"<td><h3>".$row['title']."</h3>".$row['description']."</td>";
echo"</tr>";
}
【问题讨论】:
-
-
所以?您面临的问题是什么?
-
@swapnika 有什么问题?
-
停止使用已弃用的
mysql_*API。使用mysqli_*或PDO。 -
mysql_* 在 PHP 7 中已被弃用。尝试使用 PDO 或 mysqli_*