in reply to Re: DBI conditional insert (and things of those nature)
in thread DBI conditional insert (and things of those nature)
That won't work because you're using single quotes in your prepare(), meaning you're looking for the literal string "$employee_number".Errors like this, which won't raise errors because you're executing valid SQL, can be exceedingly difficult to debug, and are avoided totally with placeholders.
As others have said, placeholders are the way to go, everywhere you can possibly use them. They automatically escape anything sketchy, also.
-Any sufficiently advanced technology is
indistinguishable from doubletalk.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: DBI conditional insert (and things of those nature)
by dvergin (Monsignor) on Jan 26, 2002 at 01:25 UTC | |
by Hero Zzyzzx (Curate) on Jan 26, 2002 at 04:47 UTC | |
|
Re: Re: Re: DBI conditional insert (and things of those nature)
by impossiblerobot (Deacon) on Jan 26, 2002 at 01:19 UTC |