multiples tables

As I can develop an application that contains a result of a SQL in Firebird with multiple tables as when choosing Implementation Grid allows me to choose only one table and if you put them in the SQL option I get the following error:

Parse error: syntax error, unexpected ‘$’, expecting T_VARIABLE in C:Archivos de programaNetMakev5wwwrootscriptcaseappespiralResumen_pedidosResumen_pedidos_grid.class.php on line 52

The SQL is:
select distinct(P.PED_ID),P.PED_FECHA,P.PED_HORA HORA,V.VE_NOMBRES,C.CL_APELLIDOS,P.PED_TOTAL,P.PED_TITEMS
from PEDINET P,VENDEDOR V,CLIENTES C
WHERE P.PED_CODVEN=V.VE_CEDULA AND C.CL_NIT=P.PED_NITCLI AND P.PED_TERMINA=‘N’
ORDER BY P.PED_FECHA DESC, P.PED_HORA DESC

Thanks

Re: multiples tables

If the query runs when you fire it directly on the database (e.g. phpmyadmin), then it should run in SC because the query is quite straightforward. I have similar queries that give no problem.

What version of SC are you using?
What does line 52 (and code surrounding it) say in Resumen_pedidos_grid.class.php ??

Re: multiples tables

What moment you get this error? Creating or Generating the application?