Hello I have been working on an sql code I found online that said that it check if there duplicates online.
What I want to do is that it checks whether if a value has a duplicate in the table it is inserting then I need to return a booleon in PHP but I am having a problem in MYSQL code. I have this code I have found online:
SELECT schedday,schedtime COUNT(schedday, schedtime) as count
FROM scstock
GROUP BY schedday, schedtime
HAVING COUNT(schedday, schedtime) > 1
Then I tried to modify it to this which is I wanted to accomplish
SELECT schedday,schedtime COUNT(schedday, schedtime) as count
FROM scstock
WHERE schedday = 'M/T' AND schedtime = '7:00-9:00/7:00-9:00'
HAVING count > 1
Can you help me?