Re: [Sqlrelay-discussion] PLEASE HELP I'M LOST, VERY URGENT
Brought to you by:
mused
|
From: david f. <df...@vi...> - 2005-11-28 21:43:52
|
Hi again
I may be start to find where the problem occur:
It seems that it does not bind the values in the request.
I try to execute the following request in psql :
INSERT INTO civility (l_id,c_libelle,c_id) VALUES (:l_id,:c_libelle,:c_id);
Just like that and I got :
ERREUR: erreur de syntaxe sur ou près de «:» au caractère 52
LIGNE 1 : ...NSERT INTO civility (l_id,c_libelle,c_id) VALUES
(:l_id,:c_l...
^
So it's the same message. It is like if the inputBind were not take in
case.
Hope it will help
REgards
David
Le Mon, 28 Nov 2005 22:22:32 -0000, david forums <df...@vi...> a
écrit:
> Hi
>
> My table :
> civility : c_id integer NOT NULL
> l_id integer NOT NULL
> c_libelle character varying(30) NOT NULL
>
>
> my php script :
> $con=sqlrcon_alloc("localhost",9001,"/tmp/mainPostgres.socket","testPostgres","test",1,3);
>
> $cursor = sqlrcur_alloc($con);
>
> sqlrcur_prepareQuery($cursor, "INSERT INTO civility
> (l_id,c_libelle,c_id) VALUES (:l_id,:c_libelle,:c_id)");
> sqlrcur_inputBind($cursor,"l_id",1);
> sqlrcur_inputBind($cursor,"c_libelle","testee");
> sqlrcur_inputBind($cursor,"c_id",5);
> if(!sqlrcur_executeQuery($cursor)) {
> echo sqlrcur_errorMessage($cursor);
> }
> sqlrcur_free($cursor);
> sqlrcon_free($con);
>
> Result :
> ERREUR: erreur de syntaxe sur ou près de «:» at character 52
> Attempted Query: INSERT INTO civility (l_id,c_libelle,c_id) VALUES
> (:l_id,:c_libelle,:c_id)
> ERROR: syntaxic error on or close to «:» at character 52 Attempted
> Query: INSERT INTO civility (l_id,c_libelle,c_id) VALUES
> (:l_id,:c_libelle,:c_id)
>
> fedora core 3 or 4:
> php (own compiled), version 5.0.4
> apache 2.0.54(RPM)
> sqlrelay 0.36.4(RPM) - 0.37 (own compiled): both work fine on select
> Postgresql 8.0.4(RPM)
>
> I make several trial, every time is the same error.
>
> Please reply as soon as possible.
>
> Regards
>
> David
>
>
>
>
>
>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Sqlrelay-discussion mailing list
> Sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
>
|