Jump to content

how to make a php condition


eloginko

Recommended Posts

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 :(

Edited by eloginko
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.