| List: | MySQL++ | « Previous MessageNext Message » | |
| From: | Mike Naylor | Date: | June 1 2009 1:56pm |
| Subject: | Re: ssqls and now() | ||
| View as plain text | |||
> > Try > > row.event_date = mysqlpp::sql_timestamp(); > > Or, just leave it unassigned. > > This only works with mysqlpp::DateTime, not with Date or Time. > > I just tried it, so I know it works. Sorry, but row .event_date = mysqlpp::sql_timestamp(); doesn't work for me. The generated SQL has the NOW() function inserted, but it is quoted in single quotes i.e VALUES (0, 'NOW()', ... Could this be causing MySQL to interpret this wrongly and set the TIMESTAMP field to "0000-00-00 00:00:00" instead of updating the date and time as it's supposed to do? Just leaving unassigned has exactly the same effect. Mike
| Thread | ||
|---|---|---|
| • ssqls and now() | Mike Naylor | 30 May |
| • Re: ssqls and now() | Warren Young | 30 May |
| • Re: ssqls and now() | Mike Naylor | 1 Jun |
| • Re: ssqls and now() | Warren Young | 1 Jun |
| • Re: ssqls and now() | Mike Naylor | 1 Jun |
| • Re: ssqls and now() | Warren Young | 1 Jun |
| • Re: ssqls and now() | Mike Naylor | 2 Jun |
| • Re: ssqls and now() | Mike Naylor | 2 Jun |
| • Re: ssqls and now() | Warren Young | 3 Jun |
| • Re: ssqls and now() | Mike Naylor | 3 Jun |
| • Re: ssqls and now() | Warren Young | 3 Jun |
| • Re: ssqls and now() | Mike Naylor | 1 Jul |
