Re: Question about Select Query VERY URGENT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In message <fg869k+sfsp@xxxxxxxxxxx>, Sudhakar <finals27@xxxxxxxxx>
writes
>My requirement is to run a select query to retrieve a particular 
>column on a specific date ex= "SELECT columnname from tablename 
>where columnname='$dt'";
>
>MY QUESTION IS = without editing the value of the date and the value 
>of the date field being 2007-10-30 08:02:40, how can i use a select 
>query which would ignore 08:02:40 and consider 2007-10-30 ONLY.

Assuming that $dt contains "2007-10-30", then
"SELECT columnname FROM tablename WHERE columnname LIKE "$dt%";


-- 
Pete Clark

Sunny Andalucia
http://hotcosta.com/Andalucia.Spain

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux