这不起作用,并且由于某种原因我从 ORDER BY 参数中收到错误?
if($selected_radio == 'city')
{
$query = "SELECT name FROM City WHERE name LIKE $1 LIMIT $2 OFFSET $3 ORDER BY name ASC";
$result = pg_prepare($conn, "findCity", $query);
$result = pg_execute($conn, "findCity", array($text, $limit, $offset));
while($row = pg_fetch_assoc($result))
{
echo "<tr>";
echo "<td>" . $i . "</td>";
echo "<td>" . $row['name'] . "</td>";
echo "</tr>";
$i += 1;
}
}
抱歉,我对这个网站还很陌生,不知道如何正确发布代码:/