Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199901

[PHP3] store pictures in the Database (sybase) From: Henning Suckel (Suckel <email protected>)
Date: 01/21/99

  I tried to store pictures in the Database (sybase) but it doesn`t work

<?
  if ($connection_id = odbc_connect("test", "dba", "sql")>0)
  {
  print " ODBC connect OK <BR>";
  };
 $image = addslashes(fread(fopen("voll.gif","r"),30000));
 $sql = "insert into test bild values ( '$image' )";
 $result = odbc_exec($connection_id, $sql); //Line 8
?>

I got the folowing result:

ODBC connect OK

Warning: SQL error: [Sybase][ODBC Driver]Syntax error, SQL state 37000
in SQLExecDirect in
E:\InetPub\wwwroot\bsp\odbc.hcw on line 8

can anybody tell me whats wrong?

Henning

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive:  http://www.php.net/mailsearch.php3
List administrator:  zeev-list-admin <email protected>