php - How to check multiple sql queries in same sql query -
how check multiple sql queries if 1 false second query running, if second wrong third run. how that. confused.
select (select count(u.`global`) user u u.global = user.user_id , launch=1 )as done , user_id user having done < 6
if false run sql query:-
select (select count(u.`global`) user u u.global = user.user_id , launch=1 )as done , user_id user having done > 7
you use siplle count grouo user , use or ( , group by) check 2 having condition
select count(u.`global`) done, u.user_id user u group user_id having done <6 or done >7
Comments
Post a Comment