First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
include "db.php";
|
||||
include "table.php";
|
||||
|
||||
$Columns = array(
|
||||
array('hotlunch_menu_items','item_title'),
|
||||
array('hotlunch_menu_items','item_description'),
|
||||
array('hotlunch_menu_items','label_title'),
|
||||
);
|
||||
|
||||
$Columns = array(
|
||||
array('supplier_products','label_name'),
|
||||
);
|
||||
|
||||
$Columns = array(
|
||||
array('formatted_content','content'),
|
||||
);
|
||||
|
||||
|
||||
for ($i = 0; $i < count($Columns); $i++) {
|
||||
$tableName = $Columns[$i][0];
|
||||
$columnName = $Columns[$i][1];
|
||||
|
||||
$tableObject = new Table($tableName);
|
||||
|
||||
$query = "SELECT * FROM $tableName WHERE $columnName LIKE '%&%' OR $columnName LIKE '%�%' OR $columnName LIKE '%"'";
|
||||
echo("$query\n");
|
||||
$results = db_query($query);
|
||||
|
||||
while ($row = db_fetch_assoc($results)) {
|
||||
$value = $row[$columnName];
|
||||
$val = $value;
|
||||
$rnum = $row['record_num'];
|
||||
|
||||
$data = array();
|
||||
$value = str_replace("&","&",$value);
|
||||
$value = str_replace("&","&",$value);
|
||||
$value = str_replace("&","&",$value);
|
||||
$value = str_replace(""",'"',$value);
|
||||
$value = str_replace("10'",'10"',$value);
|
||||
$value = str_replace("'","'",$value);
|
||||
$data[$columnName] = $value;
|
||||
$data['record_num'] = $rnum;
|
||||
|
||||
$query = $tableObject->BuildUpdate($data);
|
||||
db_query($query);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in new issue
Block a user