forked from science-ation/science-ation
21 lines
547 B
PHP
21 lines
547 B
PHP
<?
|
|
|
|
function db_update_155_post()
|
|
{
|
|
global $pdo;
|
|
// we need to query the stuff from the table
|
|
$q = $pdo->prepare('SELECT * FROM emails');
|
|
$q->execute();
|
|
while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
|
echo "Updating email id $r->id\n";
|
|
$stmt = $pdo->prepare("UPDATE emails SET
|
|
body='" . iconv('ISO-8859-1', 'UTF-8//TRANSLIT', $r->body) . "' ,
|
|
bodyhtml='" . iconv('ISO-8859-1', 'UTF-8//TRANSLIT', $r->bodyhtml) . "' ,
|
|
subject='" . iconv('ISO-8859-1', 'UTF-8//TRANSLIT', $r->subject) . "'
|
|
WHERE id='$r->id'");
|
|
$stmt->execute();
|
|
}
|
|
}
|
|
|
|
?>
|