陈述
如何将部分代码转换为准备好的语句?
edit.php
if (isset($_GET['id']))
{
$id = $_GET['id'];
$update = true;
$sql = "SELECT * FROM crimenews WHERE crimenews_id=$id";
$query = mysqli_query($conn,$sql);
if(mysqli_num_rows($query) == 1)
{
$row = mysqli_fetch_array($query);
$category = $row['crimenews_cat'];
$url = $row['crimenews_url'];
$datetime = $row['crimenews_datetime'];
$lat = $row['crimenews_locationLat'];
$lng = $row['crimenews_locationLong'];
}
}
上面的给定链接中已经提供了更多代码。
泛舟湖上清波郎朗