PDO
This commit is contained in:
@@ -79,7 +79,7 @@ function fillAddressTable($db,$limit=20) {
|
||||
// Get all ids from address table and write to array
|
||||
$strSQL="select loc_id from address";
|
||||
$result=$db->query($strSQL);
|
||||
while ($row=$result->fetchArray()) {
|
||||
while ($row=$result->fetch(PDO::FETCH_ASSOC)) {
|
||||
$arrIds[]=$row['loc_id'];
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ function fillAddressTable($db,$limit=20) {
|
||||
$strTable .= "<th>".$key."</th>";
|
||||
}
|
||||
$strTable .= "</tr>";
|
||||
while ($row=$result->fetchArray()) {
|
||||
while ($row=$result->fetch(PDO::FETCH_ASSOC)) {
|
||||
$id=$row['id'];
|
||||
if (!in_array($id,$arrIds) && $counter<$limit) {
|
||||
$counter++;
|
||||
|
||||
Reference in New Issue
Block a user