DB_Common::autoExecute()
| From: | Muhyiddin A.M Hayat | Date: | Fri, 29 Oct 2004 19:31:49 +0000 |
| Subject: | DB_Common::autoExecute() | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-15230@lists.php.net to get a copy of this message | ||
Dear all,
How to UpdateField Bytea using DB_Common::autoExecute().
I'm Using Postgresql 8.0 Beta2 Dev3 & PHP 5.0.1
My Source:
$fields_values['picture'] = pg_escape_bytea(file_get_contents($filePicture));
$db->autoExecute('test', $fields_values, DB_AUTOQUERY_UPDATE, "id = $ID");
above source doesn't work, when i'm using below code, everyting gonna be ok.
$foto = pg_escape_bytea(file_get_contents($fileFoto));
$sql = "UPDATE mahasiswa SET foto= '$foto' "
." WHERE stambuk = '$itxtStambuk'";
$db->query($sql);