PHP variable not working in SQL query?
    echo $date1u

Gives me 2010-04-21

When I take that date and hardcode it into an SQL query it works fine 

    SELECT * FROM phoneappdetail WHERE salebarn = 'OSI' AND saledate = '2010-04-21'

But when I instead use the $date1u directly it doesn't work at all.

    "SELECT * FROM phoneappdetail WHERE salebarn = 'OSI' AND saledate = '".$date1u."' "

What is the problem with my variable $date1u or SQL format that is stopping this from working?
PHP variable not working in SQL query?
===

    echo $date1u

Gives me 2010-04-21

When I take that date and hardcode it into an SQL query it works fine 

    SELECT * FROM phoneappdetail WHERE salebarn = 'OSI' AND saledate = '2010-04-21'

But when I instead use the $date1u directly it doesn't work at all.

    "SELECT * FROM phoneappdetail WHERE salebarn = 'OSI' AND saledate = '".$date1u."' "

What is the problem with my variable $date1u or SQL format that is stopping this from working?