Which is the fastest way?
a) $query="SELECT id FROM example WHERE date_sent>='".$date1."' AND date_sent<='".$date2."'";
or
b) $query="SELECT id FROM example WHERE date_sent BETWEEN '".$date1."' AND '".$date2."'";
Also, what is faster and better if I have a date in the format '02/12/2010' ?
a) to transform in php the date to a format like '2010-12-02' and compare it directly 'WHERE date_sent>=2010-12-02'
or
b) to use the mysql function:
'WHERE date>=str_to_date('02/12/2010','%d/%m/%Y')'
?
Thanks