Link to home
Start Free TrialLog in
Avatar of Bruce Gust
Bruce GustFlag for United States of America

asked on

What am I doing wrong with this query?

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.

Thoughts?
ASKER CERTIFIED SOLUTION
Avatar of Lee Wadwell
Lee Wadwell
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Well, actually ... FROM dbo_radio_stations INNER JOIN registration ON ...
Yeah, I go with that!