SELECT ClickID, AffID, Date, Time, IP, Referrer FROM `clicks` WHERE (`Date` >= {$MONTHLY} AND `Date` <= {$MONTHLYTO} AND `ProID` = '3' AND `ProID` = '6')
But it keeps giving me errors, but if i remove the
AND `ProID` = '3' AND `ProID` = '6'
part then it works fine but i only want it to select everything where the ProID values matches those 2 values.
I think you are developing in PHP and the SELECT statement is including PHP variables ({$MONTHLY}). Sometimes these are not getting assigned a value and this can result in an incomplete SQL SELECT statement:
WHERE (`Date` >= {$MONTHLY} AND `Date` <= {$MONTHLYTO} ...
could generate
WHERE (`Date` >= AND `Date` <= 10 ...
My suggestion is print off the SQL to see what is being sent to the database.