quoting sql request...
Mathieu CLABAUT
mathieu.clabaut@free.fr
Mon, 23 Jul 2001 16:04:22 +0200 (CEST)
Hello,
I was unable to modifie a sql row, with a quite recently cvs of turba...
I had to modifie turba/lib/Driver/sql.php,v 1.6, in the followin fashion :
In function setObject, replace
$set[] = $field . " = " . $this->db->quoteString($value);
by
$set[] = $field . " = '" . $this->db->quoteString($value)."'";
in order to put quotes around values.
--------------
The result is :
function setObject($object_key, $object_id, $attributes)
{
$where = $object_key . " = " . $this->db->quoteString($object_id);
unset($attributes[$object_key]);
$set = array();
foreach ($attributes as $field => $value) {
// modif MC. I got a syntax error from mysql.
//$set[] = $field . " = " . $this->db->quoteString($value);
$set[] = $field . " = '" . $this->db->quoteString($value)."'";
}
--------------
I think that all call to quoteString msut be surrounded by '. (in my PEAR
sources, quoteString only replace "'" by "\'".
Perhaps should I upgrade PEAR, but I saw that portions of IMP code, surround
call to quoteString bi quotes.
PS. I haven't look to horde for very long time (since first IMP 2.2.0, in
fact), and I'm very impressed by the work done. I hope I'd be able to put
some efforts of mine in the horde framework.
While about it, which low traffic horde maillist would you suggest me to
join in order to know about the choices made in futur horde development
(I've bad recollection of everyday high traffic of the imp mailling list).
-mathieu
--
___________________________________________________________________________
Mathieu CLABAUT mailto:mathieu.clabaut@free.fr
DIGINEXT http://mathieu.clabaut.free.fr
45, impasse de la draille, P.A. La Duranne, tel: 04 42 90 82 91
13857 Aix En Provence - cedex 3 fax: 04 42 90 82 80