I am trying to run a simple SELECT query. here is the query
$sql1=$conn->prepare("SELECT q.quoteid, q.customername, q.customersurname, q.timestamp, o.name
FROM quotes as q, occasions as o
WHERE q.occasionid=o.occasionid
AND companyid=1
AND q.day=:day
AND q.month=:month
AND q.year=:year
AND staffid='-1'
AND (q.complete != 'W' OR q.complete != 'Y')
AND q.online=0");
$sql1->execute($exearray);
/* here $exearray contain following value */
Array ( [:day] => 24 [:month] => 1 [:year] => 2014 )
Its not even showing any error. If I pass static value 1 in month it is showing data. I run this query directly on DB its working.
So I think there is no error in query. I am running this query locally on MAMP.