Jump to content
Larry Ullman's Book Forums

Recommended Posts

Hey Larry -

Great book, appreciate your thoroughness, will read your other PHP books.

I'm stuck in Chapter 5, using the SQL.sql download file to insert pages into MySQL. I keep receiving error 1292 regarding the "NOW()+100000" portion of the query. Below, "NOW()+100000" resolves to an integer, but is it merely unformatted?

ERROR 1292 (22007): Incorrect datetime value: '20190710504258' for column 'date_created' at row 2

 

Edited by Jumbo

Share this post


Link to post
Share on other sites

Regret asking this question, but if anyone wants the answer, I had to use now() in a context that would render an acceptable value. For me this was in combination with interval:

(NOW() + INTERVAL 1 DAY)) .. etc. Converted seconds (?) to days.

Share this post


Link to post
Share on other sites

Hmmm...this is the kind of thing that may change in different versions of MySQL. Nice work switching to using the + INTERVAL syntax, though!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...