1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

if value is >65 transfer to different DB

Discussion in 'Databases' started by brian1210, Dec 5, 2017.

  1. #1
    https://stackoverflow.com/questions/...rts-new-data-t

    I tried the link above but receiving a syntax error, my is easier then that one.
    I have datetime, temperature, and humidity written in a table called tempdata.
    I would like to have trigger that if value is above 65 for temperature (float), write to a different table or database called test.
    Then email out when test is modified.

    I have phpmyadmin 4.5.4
    mysql ver 14.14 distrib 5.7.20
    python 2.7.12
    Ubuntu mate 1.16.2
    Gnome 2
    Raspberry pi 2
    SEMrush
    Thank You
     
    brian1210, Dec 5, 2017 IP
    SEMrush
  2. jestep

    jestep Prominent Member Premium Member

    Messages:
    3,620
    Likes Received:
    211
    Best Answers:
    18
    Trophy Points:
    330
    #2
    Deal with logic in the application not the database. Otherwise if you feel you must do it, I would probably opt for a trigger and a federated table schema.
     
    jestep, Dec 6, 2017 IP
    SpacePhoenix likes this.