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 

but having error enter image description here

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 

but appears enter image description here

can me?

try below query result

select schedday,schedtime, count(*) count scstock group schedday, schedtime having count > 1 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -