php - Checking if there are duplicates in a tables -
hello have been working on sql code found online said check if there duplicates online.
what want checks whether if value has duplicate in table inserting need return booleon in php having problem in mysql code. have code have found online:
select schedday,schedtime count(schedday, schedtime) count scstock group schedday, schedtime having count(schedday, schedtime) > 1
then tried modify wanted accomplish
select schedday,schedtime count(schedday, schedtime) count scstock schedday = 'm/t' , schedtime = '7:00-9:00/7:00-9:00' having count > 1
can me?
try below query result
select schedday,schedtime, count(*) count scstock group schedday, schedtime having count > 1
Comments
Post a Comment