我有我的数据库,我正在检索如下的数据。但我需要检索它们更安全,以防止sql injections.in我的脚本我得到所有的字段,如下面和回声在我想要的地方显示字段。 请告诉我一个安全的方法来获取它们。请帮助我,任何帮助非常感谢。 我想使用while函数来检索所有数据。请帮助我
<?php
$getdata ="SELECT * FROM tblname ODER BY ";
$result = mysql_query($getdata);
$row = mysql_fetch_array($result);
$bookName = $row['bookName'];
$timestamp = $row['timestamp'];
$Country = $row['Country'];
$Category = $row['Category'];
$Price = $row['Price'];
$Photo1name = $row['Photo1name'];
?>