I\'m working with a table in MySQL that contains the following columns:
id, january, february, march, april, etc
The data in the table looks li
I understand what Mr.Smith is trying to do.
It's a question of 12 rows x 4 columns vs. 1 row x 12 columns.
The former table design would be something like:
id, someone's id, month, value x 12 per month
1, 101, january, 1
2, 101, february, 1
3, 101, march, 0
etc..
The corresponding sql statement to this would be:
$sqlQuery = "SELECT month FROM my_month_table WHERE value = 1";
What I'm guessing Mr.Smith is trying:
id, someone's id, january, february, march ...
$sqlQuery = "SELECT corrensponding_column_names_to_where_clause FROM my_month_table WHERE column_value = 1";