All SQL strings in class_webdav.php use single-quoted
strings (for the parameters, not the sql string). They
cause an error like this in PostgreSQL:
query failed: ERROR: attribute 'root' not found
For example, the login SQL string is:
'SELECT ID, pw, gruppe FROM '.WD_TAB_USER. ' WHERE
'.$field_name.'="'.$user.'"'
but I have to change it to:
'SELECT ID, pw, gruppe FROM '.WD_TAB_USER. ' WHERE
'.$field_name.'=\''.$user.'\''
to make it work in PostgreSQL.
As far as I know, in PostgreSQL single-quotes are used
to delimit string constants, while double-quotes are
used to delimit identifiers (called delimited
identifiers) such as column names or table names.
In Phprojekt all SQL strings are sorrounded by
double-quotes but individual parameters are enclosed
using single-quotes. That may be a definitive solution
that would work with all DB back-ends supported by
Phprojekt. So, for example, the login SQL string would
become:
"SELECT ID, pw, gruppe FROM ".WD_TAB_USER. " WHERE
".$field_name."='".$user."'"
Mario A. Valdez-Ramirez.
Logged In: YES
user_id=901568
I made a mistake on this bug report, the title should read
"double-quotes in SQL strings dont work in PostgreSQL". And
the first paragraph should state that: "All SQL strings in
class_webdav.php use double-quoted strings (for the
parameters, not the sql string)."
Sorry for the confusion.
Mario A. Valdez-Ramrez.