eloginko Posted January 25, 2014 Share Posted January 25, 2014 can anyone help me come up a good php condition that if a specific aic from tb_applicants with a total=7 from this query SELECT count(t.atic) as total,t2.name FROM app_interview as t, tb_applicants as t2 WHERE t.atic = t2.aic GROUP BY t.atic; will execute this query INSERT INTO afnup_worksheet (faid,faic,fnl_name,ftotal) SELECT DISTINCT t.atid ,t.atic ,t.atname ,(SELECT SUM(t2.inttotal) FROM app_interview t2 WHERE t2.atic = t.atic)/7 thissum FROM app_interview t GROUP BY atname HAVING COUNT(DISTINCT atic)=1 i want to execute insert query to those specific applicants if those applicants with a total of 7 on the count query matches..can anyone help me?please im still learning..so be easy on me Link to comment https://forums.phpfreaks.com/topic/285663-how-to-make-a-php-condition/ Share on other sites More sharing options...
ginerjm Posted January 25, 2014 Share Posted January 25, 2014 What do you define as a "php condition"? I am unfamiliar with that term Link to comment https://forums.phpfreaks.com/topic/285663-how-to-make-a-php-condition/#findComment-1466540 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.