> "DBD::mysql::db do failed:

On Wed, Nov 12, 2008 at 4:31 PM, Bruce Johnson
<[EMAIL PROTECTED]> wrote:
> I'm trying something along the lines of:
>
> insert into foo(fname, lname, phone, dateadded, status, datemodified) values
> (?,?,?,curdate(),1,curdate())
>
> and it's failing saying I have an sql error at ...curdate().
>
> "DBD::mysql::db do failed: You have an error in your SQL syntax; check the
> manual that corresponds to your MySQL server version for the right syntax to
> use near ' curdate())' at line 1 at ./webdirectory_updater.pl line 128."
>

Are you using do() instead of prepare()?  Placeholders go into with
prepared statements, not immediate executions.




> I cannot mix parameters and functions like that?

Yes you can, in a prepared statement.


>
>
>
> --
> Bruce Johnson
> University of Arizona
> College of Pharmacy
> Information Technology Group
>
> Institutions do not have opinions, merely customs
>
>
>



-- 
They who would give up an essential liberty for temporary security,
deserve neither liberty or security.
Benjamin Franklin

Our lives begin to end the day we become silent about things that matter.
Martin Luther King

The right of the people to be secure in their persons, houses, papers,
and effects, against unreasonable searches and seizures, shall not be
violated, and no warrants shall issue, but upon probable cause,
supported by oath or affirmation, and particularly describing the
place to be searched, and the persons or things to be seized.

Amendment IV to the Constitution of the United States

"I am not going to answer any questions as to my association, my
philosophical or religious beliefs or my political beliefs, or how I
voted in any election, or any of these private affairs. I think these
are very improper questions for any American to be asked, especially
under such compulsion as this."
Pete Seeger before the House Un-American Activities Comittee

Reply via email to