Msyql str_to_date

Hello,


<?php
$query="SELECT * FROM sms_logs 
           WHERE empno='$empno' 
           AND STR_TO_DATE(LEFT(date,10),'%Y/%m/%d')=....";
?>

my question is, the first parameter LEFT(date,10) of STR_TO_DATE() need to be enclosed by 's ?

what happened when you tested it? ™

could not see any different it seems :slight_smile:

o rly?

please show the actual query you ran with the quotes around LEFT(date,10)

I am sorry! just tested again and it does not have to be enclosed by '. if i did , then no out put (no errors shown though).
tx r937