science-ation/db/db.update.155.php

15 lines
424 B
PHP

<?
function db_update_154_post() {
$q=mysql_query("SELECT * FROM emails");
while($r=mysql_fetch_object($q)) {
mysql_query("UPDATE emails SET
body='".mysql_real_escape_string(iconv("ISO-8859-1","UTF-8",$r->body))."' ,
bodyhtml='".mysql_real_escape_string(iconv("ISO-8859-1","UTF-8",$r->bodyhtml))."' ,
subject='".mysql_real_escape_string(iconv("ISO-8859-1","UTF-8",$r->subject))."'
WHERE id='$r->id'");
}
}
?>