[Sqlrelay-discussion] I got a big problem
Brought to you by:
mused
|
From: david f. <df...@vi...> - 2005-12-15 08:48:59
|
I'm under php5.1.1(identical problem with 5.0.x), and use pear D, postgres
8.0.4
I send the following array as fields_values for an autoExecute insert.
Array
(
[id] => 1
[creating_date] => CURRENT_DATE()
[modify_date] => CURRENT_DATE()
[last_login] => CURRENT_DATE()
[login] => my_log
[password] => my_pass
[reference] => 59C1134WBA6355
[other_id] => 126
)
the array is still ok just before the sqlrcur_inputBind() method in
PEAR::sqlrelay.php
but the sqlrelay debug function return :
Sending Query: INSERT INTO users
(id,creating_date,modify_date,last_login,login,password,reference,other_id)
VALUES ($1,$2,$3,$4,$5,$6,$7,$8) Length: 164
Requesting a new cursor.
Sending 8 Input Bind Variables: id(4:LONG)=1
creating_date(15:STRING)=CURRENT_DATE()(14)
modify_date(13:STRING)=CURRENT_DATE()(14)
last_login(12:STRING)=CURRENT_DATE()(14) login(7:STRING)=my_log(10)
password(10:STRING)=my_pass(7) reference(11:STRING)=59C1134WBA6355(14)
other_id(5:STRING)=126(3)
Sending Output Bind Variables:
Send Column Info: yes
Skipping and Fetching row to get: 99 S
kipping 0 rows
Fetching 100 rows Checking For An Error... error!!!
Getting Error From Server ERREUR: La valeur «current» pour la date et
heure n'est plus supportée Attempted Query: INSERT INTO users
(id,creating_date,modify_date,last_login,login,password,reference,other_id)
VALUES ($1,$2,$3,$4,$5,$6,$7,$8)
Getting Cursor ID... Cursor ID: 0
Aborting Result Set For Cursor: 0
Deallocated cursor
The question is :
1 Why sqlrelay is taking care off the value and the string quotation, it
is not at all is role ?
2 Why the postgres method CURRENT_DATE() is conciderate as a string ?(and
so quoted)
2 Why the value CURRENT_DATE() is output by the database error handle as
"current" only ?
Please help
Regards for all this great job
David
|