List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:June 3 2009 6:48pm
Subject:Re: ssqls and now()
View as plain text  
Mike Naylor wrote:
> 
> Here is a small test program which I hope someone will compile and run.

I modified examples/simple1.cpp to include your code, differing only in 
that it uses the MySQL++ examples' DB and command line parsing mechanism 
instead.  (Sorry, my MySQL++ test user doesn't have permission to create 
new DBs, and I don't want to run your code as root.)

Anyway, it works as expected:

> $ ./exrun simple1 -utest -ptest
> Connecting to server...
> Dropping old table...
> Creating new table...
> Inserting a row...
> Using the full declaration - expecting MySQL to update the timestamp...
> QUERY: INSERT INTO t_events (id,updated,sometext) VALUES (0,NOW(),'Hello World!')
> Selecting the row...
> RESULT: id = 1, updated = 2009-06-03 12:40:05, sometext = Hello World!

If I understand your complaint, you see "updated = 0000-00-00....", yes?

I've attached the modified example.

This is with svn MySQL++, but I don't see that 3.0.9 should work 
differently.  MySQL 5.0.81.

Attachment: [text/x-c++src] simple1.cpp
Thread
ssqls and now()Mike Naylor30 May
  • Re: ssqls and now()Warren Young30 May
    • Re: ssqls and now()Mike Naylor1 Jun
      • Re: ssqls and now()Warren Young1 Jun
        • Re: ssqls and now()Mike Naylor1 Jun
          • Re: ssqls and now()Warren Young1 Jun
            • Re: ssqls and now()Mike Naylor2 Jun
              • Re: ssqls and now()Mike Naylor2 Jun
              • Re: ssqls and now()Warren Young3 Jun
                • Re: ssqls and now()Mike Naylor3 Jun
                  • Re: ssqls and now()Warren Young3 Jun
                    • Re: ssqls and now()Mike Naylor1 Jul