When executing the request, this error appears

Parse error: syntax error, unexpected T_STRING in 

Request here:

  $sql='select a.id , b.city_lng, b.city_lat from t_city as a, t_city_coord as b where a.id =b.city_id and a.city_name_rus="'.$city_name.'"'; $res=mysql_query($sql) or die mysql_error; 

I do this in phpmyadmin - it works great. The base is connected, since after this request there will be a few more and they work well.

    1 answer 1

     $res=mysql_query($sql) or die(mysql_error()); 

    die ()

    • Oh well, I must have been so stupid. Spasibki - LIVE
    • @ Yevhen Formanyuk, If you are given a comprehensive answer, mark it as correct (click on the check mark next to the selected answer). - Artem
    • now the real error was determined: SELECT command denied to user '' @ 'localhost' for table 't_city' - I ’m living