Kronolith sql driver not using table-param
Martin List-Petersen
martin@list-petersen.dk
Fri, 7 Dec 2001 13:15:36 +0100
---------------------- multipart/alternative attachment
><!--StartFragment-->>=20
>> > These examples are for the mcal driver. You need sql params - they
>> pretty
>> much
>> > look like the sql preferences configuration, etc.
>> >
>>=20
>> Is this the param structure you refer to?
>>=20
>> $conf['calendar'] =3D array(
>> 'driver' =3D> _("sql"),
>> 'params' =3D> array(
>> 'username' =3D> _("kronolith"),
>> 'password' =3D> _("actualpasswd")));
>
>Try something like this:
>$conf['calendar']['params']=3Darray(
> 'phptype'=3D>'mysql',
> 'hostspec'=3D>'localhost',
> 'username'=3D>'horde',
> 'password'=3D>'****',
> 'database'=3D>'horde',
> 'table'=3D>'kronolith_events'
>);
>
>
it seems like kronolith is ignoring the 'table' field. I've trying to =
use another table-name .....=20
Here is the diff, if you're interested:
diff kronolith/lib/Driver/sql.php.orig kronolith/lib/Driver/sql.php
125c125
< $q =3D 'SELECT DISTINCT e.event_id, e.event_recurtype FROM =
kronolith_events e' .
---
> $q =3D 'SELECT DISTINCT e.event_id, e.event_recurtype FROM =
'.$this->params['table'].' e' .
160c160
< ' FROM kronolith_events WHERE event_id =
=3D ' . $eventID);
---
> ' FROM '.$this->params['table'].' WHERE =
event_id =3D ' . $eventID);
185c185
< $query =3D 'UPDATE kronolith_events SET ';
---
> $query =3D 'UPDATE '.$this->params['table'].' SET ';
200c200
< $id =3D $this->db->nextId('kronolith_event');
---
> $id =3D $this->db->nextId($this->params['table']);
206c206
< $query =3D 'INSERT INTO kronolith_events ';
---
> $query =3D 'INSERT INTO '.$this->params['table'].' ';
321c321
< $query =3D "DELETE from kronolith_events WHERE event_id =3D =
$eventID";
---
> $query =3D "DELETE from '.$this->params['table'].' WHERE =
event_id =3D $eventID";
Regards,
Martin List-Petersen
martin@list-petersen.dk
http://www.marlow.dk
---------------------- multipart/alternative attachment--