Re: [Openledger-developer] The correct way to db?
Brought to you by:
klavs
From: Tony F. <to...@sy...> - 2005-03-04 19:58:49
|
On Fri, 2005-03-04 at 11:37, Klavs Klavsen wrote: > | While we're on the topic of placeholders, my preference is for > | positional placeholders. ie. > | > | INSERT INTO blah (foo, bar, baz) VALUES (:1, :2, :3) > > Cool - I didn't know you could to that too. do you give the number to > execute, or is it just the order, that decides their number? It's just the order you give them to execute. I'm not sure if DBD::mysql supports this form. I know that DBD::Pg does though. I use them exclusively in my Service Billing module. > hmm. Do I need to do some audit-trail stuff in my post_transaction > function(perhaps SL does it - and It's just hidden in some function or > the form)? Yup, at the end of post_transaction there is a call to $form->audittrail() you'll fing the DB stuff in SL/Form.pm sub audittrail. > |> If I can use it - then isn't that the correct way to do it? > | > | > | I'm not really a DB guy but the way SL does it is very common in my > | experience and I believe it is considered to be "the RDBMS > | independent way". > > I bet it is - but I thought we agreed on not wanting to make it DB > independant, to make use of some of postgresql's features? > > But I'll just do it the way SL does - then I don't have to change the > sql statements :) I don't see why we should go out of our way to make it non portable. If there is a PostgreSQL feature that is the right tool use it... But why not make it as easy as possible to port at a later date. -- Tony Fraser to...@sy... Sybaspace Internet Solutions System Administrator phone: (250) 246-5368 fax: (250) 246-5398 |