Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: ct_sql or ct_execute
Date: Nov 7 2001 12:44AM
"Cox, Mark" wrote:
> I have been using the Ct_Lib for about a year and it has worked wonderfully.
> I haven't noticed any difference in efficency between using ct_sql to run
> an update command or using ct_execute. Is one way actually 'better'
> than the other for running an update command?
ct_sql() has the advantage of handling all the processing, so you don't have to
worry about handling various return codes, etc.
As usual, it's a question of control vs. ease of use. ct_execute() gives you
more control (because you have to code the ct_results loop, and so you can handle
error conditions with more care), but ct_sql() is easier to use and faster
(and will be just fine for almost all cases of running updates or inserts).