What am I doing wrong with this query?
Posted on 2012-09-01
Here's my query:
$bruce = "select registration.id, registration.winner_type, registration.radio_name, registration.year, dbo_radio_stations.station_name, dbo_radio_stations.state as radio_state inner join registration on dbo_radio_stations.station_name= registration.radio_name where registration.winner_type='State' and registration.year='$this_year' order by dbo_radio_stations.state";
I keep getting told:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'inner join registration on dbo_radio_stations.station_name= registration.radio_n' at line 1
...and I don't know what I'm doing wrong.