here’s my sample sql code
SELECT * FROM wsrecruitcvhead AS CV, wsrecruittimes AS WT
WHERE
CV.`ResumeTitle` LIKE '%search%'
OR ResumeSummaryIntroduction LIKE '%search%'
OR WT.`AvailableToWorkSunday` = 0
OR WT.`AvailableToWorkMonday` = 0
OR WT.`AvailableToWorkTuesday` = 0
OR WT.`AvailableToWorkWednesday` = 0
OR WT.`AvailableToWorkThursday` = 0
OR WT.`AvailableToWorkFriday` = 0
AND CV.`ResumeID` = WT.`ResumeID`
ORDER BY CV.ResumeID ASC;
am getting duplicate rows of data…it didn’t help when i tried SELECT DISTINCT * , what to do with this ?, how to solve it ?
You query is equivalent to:
This means you don’t have a good join between the two tables. Learn to use the explicit join notation to save yourself this grief:
However, although this is a simple and direct modification of your query, you probably had in mind:
Or even (since there’s no obvious reason to omit Saturday):