mysql - How to connect two tables in phpmyadmin? -


i'm running wateranalyzer , want save sensor-data in mariadb. split data 2 tables: 1 automated part , 1 table stores data enter manually:

tables:

tables

i'm having hard time (with basic knowledge databases) figure out how can "bind" id , datetime 1 table other one, if manual data added, id incremented 1 , actual date , time set in datetime.

i bet can somehow in phpmyadmin?

thanks time!

using triger. example you.

delimiter //  create trigger contacts_after_insert after insert    on contacts each row  begin     declare vuser varchar(50);     -- find username of person performing insert table    select user() vuser;     -- insert record audit table    insert contacts_audit    ( contact_id,      deleted_date,      deleted_by)    values    ( new.contact_id,      sysdate(),      vuser );  end; //  delimiter ; 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -