DB2 - wrong number of parameters
am 17.07.2006 20:01:49 von Pablo Garay--0-227635547-1153159309=:43229
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Hi!
I=B4m working with PHP 5 and using the DB2 database.
I=B4m trying to update a jpg file, that=B4s save on the database.
here=B4s the code:
=20
$fp =3D @fopen("$caminho/$nome_arquivo", 'r');
$content =3D fread($fp, filesize("$caminho/$nome_arquivo"));
$content =3D bin2hex($content);
fclose($fp);
=20
$conn =3D $this->DB2->getConn(); //get the connection id
$q =3D "update dbsm.FUNCIONARIOS set FOTO=3D? where ID_FUNCIONARIO=3D?"=
;
$res =3D odbc_prepare ($conn, $q);
$array =3D array();
$array[0] =3D $content; //file
$array[1] =3D $idFuncionario;
=20
$exc =3D odbc_execute($res, $array);
but when I run it, the folow warning appears:
Warning: odbc_execute() [function.odbc-execute]: SQL error: [IBM][CLI Drive=
r] CLI0100E Wrong number of parameters. SQLSTATE=3D07001, SQL state 07001 i=
n SQLExecute in C:\Arquivos de programas\Apache Group\Apache2\htdocs\princi=
pal\Portal\Repositorio\Funcionarios.class.php on line 170
what=B4s the problem???
thanks
Pablo Garay
Iju=ED - UNIJUI
RS - Brasil
--0-227635547-1153159309=:43229--