• Resolved mcaso

    (@mcaso)


    Good afternoon,

    I am mapping a form to a table which allows me to automatically save “subscribers” in Mail Poet. Everything is working fine except from the Currect_date.
    I tried with many options : getdate(), curdate(), date(). But they are not working. The field is save in blank.

    The current_date field is Type_int(10).
    My php version is 7
    WP 4.2.2

    I really appreciate any help!
    Thanks a lot
    Marcela

    https://www.ads-software.com/plugins/form-maker/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Sona

    (@support-web-dorado)

    Dear Marcela,

    When creating the query remove the brackets:

    https://imagizer.imageshack.us/a/img921/3057/pezJq7.png

    This should work.

    Thread Starter mcaso

    (@mcaso)

    Dear Sona,

    Thank you so much for your help. Unfortunately it did not work.

    Here you have the query I tried:

    INSERT INTO 2k58H_wysija_user (email, firstname, lastname, confirmed_ip, created_at, status) VALUES (“{8}”, “{12}”, “{11}”, “{ip}”, “getdate()”, “1”)

    Then when I checked the susbcriber the date is not recorder.

    Thank you so much for your help.
    Marcela

    Sona

    (@support-web-dorado)

    Dear Marcela,

    It should be like this:

    INSERT INTO 2k58H_wysija_user (email, firstname, lastname, confirmed_ip, created_at, status) VALUES (“{8}”, “{12}”, “{11}”, “{ip}”, getdate(), “1”)

    Thread Starter mcaso

    (@mcaso)

    Dear Sona,

    Thank you for your email, now when I tried this no record at all was saved.

    Thanks a lot!

    Sona

    (@support-web-dorado)

    @mcaso,

    Can you please try instead the following

    INSERT INTO 2k58H_wysija_user (email, firstname, lastname, confirmed_ip, created_at, status) VALUES (“{8}”, “{12}”, “{11}”, “{ip}”, NOW(), “1”)

    Thread Starter mcaso

    (@mcaso)

    Dear Sona,

    I was working on that. I have already tried now() and I get the wrong date:
    7. February 2106

    I checked the server date: UTC time is 2016-03-23 14:45:52
    and my format is: j. F Y.
    Should be something with this?

    Only to let you now, I tried curdate() because with this I get only the date and I got: 22. August 1970

    So I am lost….

    Thanks a lot fo ryour effort!

    Sona

    (@support-web-dorado)

    @mcaso,

    You might try using the formatting option of date(‘j F Y’) intead of just getdate().

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘MySql mapping can′t save current date’ is closed to new replies.