Jump to content
php.lv forumi

Problēma


Dooling

Recommended Posts

Man vajag glabāt bildes postgres tabulā.

 

izveidoju šādu vaicājumu, bet nedarbojas

 

$dbconn = pg_connect("host=localhost port=5432 dbname=vkv user=root password=parole");

$sql = "update logos set result=lo_import('small/1.png'), large=lo_import('large/1.png')  where com_id='1'"; 
pg_query($sql);

 

rāda šādu kļūdu:

 

pg_query(): Query failed: ERROR: could not open server file "small/1.png": No such file or directory

 

Uzklausīšu padomus kā atrisināt šo kļūdu.

 

P.S. Paša tabula

CREATE TABLE logos
(
 com_id int4 NOT NULL DEFAULT 0,
 office_id int4 NOT NULL DEFAULT 1,
 result oid,
 "large" oid
)

Link to comment
Share on other sites

×
×
  • Create New...