php mySQL day of week
php mySQL day of week
- Started
- Last post
- 2 Responses
- frankosonik
I need to show a different row from a database table for each day of the week, but I keep getting this error: Unknown column 'Tuesday' in 'where clause'
Here's the php:
$date = date("l");
$query_Recordset2 = "SELECT today, city, zip, state, area FROM table_name WHERE today = $date";Any reason as to why I'm getting this error?
Thanks!
- unfittoprint0
you probaly have to retrieve the day/month from your table's timestamp to successfully compare to your today variable.
- frankosonik0
Thanks, unfit. That fixed it.