Dooling Posted July 21, 2006 Report Posted July 21, 2006 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 )
v3rb0 Posted July 21, 2006 Report Posted July 21, 2006 nevajag Tev bildes db tabulā glabāt. glabā bildes failos un datubāzē tikai vajadzīgo metainfo - izmēru, nosaukumu, tipu utt.
Dooling Posted July 21, 2006 Author Report Posted July 21, 2006 (edited) Nu es jau neglabātu, bet man tā vajag, jo šefs teica, ka bildes jāglabā datubāzē. Gaidu padomu :) Edited July 21, 2006 by Dooling
Dooling Posted July 21, 2006 Author Report Posted July 21, 2006 (edited) Protams, ka nē. Edited July 21, 2006 by Dooling
Delfins Posted July 21, 2006 Report Posted July 21, 2006 1.) NU un vai tad tu nevari pretoties un pateikt, ka tā nav smuki? 2.) norādi pilno ceļu, kas ir uz servera... (DB un HTTP serverim jābūt vienā kompī)
direktors Posted July 21, 2006 Report Posted July 21, 2006 jo šefs teica, ka bildes jāglabā datubāzē. arguments?
Kristabs Posted July 21, 2006 Report Posted July 21, 2006 Portablāka aplikācija, tas arī viss. Pats to neizmantoju, jo vajag izmantot definētus path`us un + kabināt no db nosaukums, rezultātā tas pats portablums. Reku var palasīt saraksti files in db vs. filesystem http://www.mail-archive.com/struts-user@ja...g/msg18853.html
Recommended Posts