Hi I have a query program where a user logs a query and when they log their query they get a query id and their username and query get logged at well as the date and time. I also have another form which updates the query when it is attended too or when it is closed which updates the rest of the feilds in that row. So now what im trying to do is that if the query is already been attended too it must give an error if another person trys to attend the same query bt if it hasnt been attended to then it must update the remaining feilds
"SELECT Count(*)as numrows FROM table WHERE approved=1 and Attendby='"
"query already attended"
"UPDATE tableSET CustomerDetails='$details',Department='$dept',AttendDate='$NewDate',AttendTime='$NewTime',CallType='$type ',Attendby='$attend ',QueryStatus='$status' Where QueryId= $id"