PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am tring to query a MySQL database. The user selects the year and date from a dropdown menu. My question is "What is the proper syntax to select all the months OR just one."
The dropdown menu lists:
ALL
JAN
FEB
MAR
etc....
If the user selects "ALL" I want the query to return all the rows matching the "date_month" column.
FROM eventpost WHERE date_year=$year_filter" AND date_month=month_filter;
$result = mysql_query($query);
check_mysql();
while ($row=mysql_fetch_array($result, MYSQL_ASSOC))