Ajax Question

Count the Dtrec_ID in the databae

I just want to ask on how to count the Dtrec_ID, example to count how many 1 in there and it will display in the "Days Present" textbox.

click this, to see the form.

click this, to see the database.

Answer

the query should look like this :

SELECT COUNT(Dtrec_ID) as DaysPresent FROM dailytimerec where Dtrec_ID=1 ;