Re: Adding a record to a database [message #175125 is a reply to message #175124] |
Tue, 16 August 2011 13:51 |
Tim Streater
Messages: 328 Registered: September 2010
Karma:
|
Senior Member |
|
|
In article <ttnk47593ucb0h3crdh61kemnbuc88q5mr(at)4ax(dot)com>,
A.Reader <anonymously(at)example(dot)com> wrote:
> On Tue, 16 Aug 2011 06:23:06 -0400,
> Jerry Stuckle <jstucklex(at)attglobal(dot)net> wrote:
>> Better yet - get rid of the die() all together and handle the error
>> gracefully. Then ask about the SQL problem in the appropriate newsgroup.
>
> We're talking about the debugging phase here, aren't we? There
> shouldn't _be_ any sql errors left by rollout.
>
> And, from the error msg, the error doesn't represent an "SQL
> problem" as such but rather a plain syntax error. My suggestion
> was aimed at helping him improve his PHP code such that he could
> then find the error. That seems to be within the remit of this
> group.
You're overlooking bugs in the implementations that you rely on, and
obscure bugs of your own. I get occasional SQLite errors that I believe
to be SQLite bugs, but I'm not 100% sure if that's true. I have my own
wrapper on SQLite calls that uses try/catch, and logs errors to a
logfile, with as much info as possible. This sort of approach should be
designed in as soon as possible in the app.
Just imagining that "there won't be any mysql (or whatever) errors by
rollout" is naive.
--
Tim
"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
|
|
|