Hello ,
Need help by MYSQL script. I am a beginner in this case.
Need to calculate record count in current DB and if count is 0 then update another DB.
Try run the attached script but get a syntax error.
Script:
If (COUNT(*) FROM hostmdb.tblserverhistory where LPNumber = '1' and CurrentTimestamp > (now() - interval 1 hour) < 1
INSERT INTO tms.mail_send(`id`, `sender`)
VALUE(null, [email='test@test.com]'test@test.com[/email]');
Please help.
Need help by MYSQL script. I am a beginner in this case.
Need to calculate record count in current DB and if count is 0 then update another DB.
Try run the attached script but get a syntax error.
Script:
If (COUNT(*) FROM hostmdb.tblserverhistory where LPNumber = '1' and CurrentTimestamp > (now() - interval 1 hour) < 1
INSERT INTO tms.mail_send(`id`, `sender`)
VALUE(null, [email='test@test.com]'test@test.com[/email]');
Please help.