Subject | RE: [firebird-php] FireBird/ADODB |
---|---|
Author | Alan McDonald |
Post date | 2007-06-04T21:41:15Z |
> Alan McDonald wrote:ahh great - that's what I needed.
> > I haven't looked that closely yet but afer a cursory glance I
> see a lot SQL
> > with "LIMIT N" clauses. Makes me suspicious if ADODB would
> translate them or
> > whether indeed the php code is built a lot around custom SQL.
>
> Those are easy to fix - you just drop the 'LIMIT N' and add the third and
> fourth parameters in the query function. Not taking care of it is just
> laziness on the part of the coders.
>
> Actually - I can only find one *IN* the program, the rest are in
> the drivers?
>
> $db->Query("SELECT old_value, new_value
> FROM {history}
> WHERE field_changed = 'percent_complete'
> AND task_id = ? AND old_value != '100'
> ORDER BY event_date DESC
> LIMIT 1",
> array($task['task_id']));
>
> Simply becomes
>
> $db->Query("SELECT old_value, new_value
> FROM {history}
> WHERE field_changed = 'percent_complete'
> AND task_id = ? AND old_value != '100'
> ORDER BY event_date DESC",
> array($task['task_id']), 1);
>
> And you are laughing ;)
>
> --
> Lester Caine - G8HFL
I may be able to convince the developers to accept these mods so I can keep
ging with their development.
Alan