mysql else if
IF condition1 THEN
statements;
ELSEIF condition2 THEN # OPTIONAL
statements;
ELSE # OPTIONAL
statements;
END IF;
mysql else if
IF condition1 THEN
statements;
ELSEIF condition2 THEN # OPTIONAL
statements;
ELSE # OPTIONAL
statements;
END IF;
MySQL IF without else
SELECT * FROM callback LEFT JOIN agent ON callback.agent_ID=agent.agent_ID
LEFT JOIN contact ON callback.contact_ID=contact.contact_ID WHERE callback.agent_ID =118
AND DATE(callback.cb_dt) =curdate()
and Hour(time(callback.cb_dt)) <= Hour(time(UTC_TIMESTAMP()))
and
(if(Hour(time(callback.cb_dt)) = Hour(time(UTC_TIMESTAMP())),
minute(time(callback.cb_dt)) < minute(time(UTC_TIMESTAMP())) and
cb_IsDeleted=0 ,cb_IsDeleted=0))
and callback.isCalled=0;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us