Jump to content

selecting date from table problem


tchick

Recommended Posts

Hi All,

 

I am trying to pull a record from my table using the date of birth column (which is a date column) like so..

 

$birthday = ('1936-08-21');
$query = "Select * from my_table where dob = $birthday";
$result = mysql_query($query);
       while ($row = mysql_fetch_array($result)){
        echo "Name is - " .$row['name'];
    }

 

I know there is a record in the table with a date of birth(dob) value of 1936-08-21 but it does not return any records ?

 

thanks for looking, Tony

 

 

Link to comment
https://forums.phpfreaks.com/topic/234251-selecting-date-from-table-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.