List:MySQL++« Previous MessageNext Message »
From:Mike Naylor Date:June 3 2009 7:47pm
Subject:Re: ssqls and now()
View as plain text  
>> 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!

Hi Warren and thanks for looking in to this - and for posting the  
program's output.  As you say, it performs perfectly.

I've since done some more tests, but still observe that the NOW()  
function is being quoted - as in 'NOW()' - on my server.  Quoting a  
function will  of course demote it to a simple text field which the  
MySQL engine will ignore.

I can only suggest that there is either an error in the current  
release of MySQL++, or that something went wrong when whoever ported  
MySQL++ to the Debian 5.0 platform.  Meanwhile, and admitting that I'm  
still learning how to use SQL effectively, I've decided to change my  
timestamp fields to datetime and set them by hand to UTC system time.

One more thing...  I'm using a very wide diamond shaped class  
structure and finding it difficult to distribute the SSQLS  
declarations in a logical way.  I've finished up having to put them  
all into one global file - not very modular at all.  So, I'm asking if  
anyone can recommend an implementation guide I could read.

Regards, Mike.

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