i need mysql database to only contain 20 records per certain date and if a user tries to enter more data on a given that has 20 records already ...i want the program to refuse that entry and prompt the user for another date.i'm using php mysql
this is what i have tried
select count($hopeid)from clinics
Where $date > midnight today and $date < 1159pm tonight and $hopeid =(hopeid)
if results < 20 then
mysql_query("INSERT INTO clinics(hopeid, date, time, appttype, newonARV,newfile,txtname)
VALUES
('$hopeid','$date','$time','$appttype','$newonARV','$newfile','$txtname')") or die(mysql_errno());
else {
Echo"this date is full please choose another date";(mysql_errno();
}