I am trying to use INNER JOIN (in the general tab of the form - SQL field) but always receive the "blue screen" with lots of information that may be useful for an expert, but not for me unfortunately.
Can someone point me to a way to find the SQL syntax error using some form of debug?
This SQL statement runs fine inside PHPadmin, gives error in form:
SELECT *
FROM sea_fretes INNER JOIN sea_forn_contatos
ON sea_forn_contatos.forcon_id = sea_fretes.forcon_id
ORDER BY sea_fretes.fre_id
in the blue screen it is expanded to:
SELECT forcon_id, fre_status, fre_datapedido, fre_dataagendada, fre_turno, fre_celularcli, fre_cliente, fre_endereco, fre_bairro, fre_cidade, fre_CEP, fre_estado, fre_id FROM sea_fretes INNER JOIN sea_forn_contatos ON sea_forn_contatos.forcon_id = sea_fretes.forcon_id ORDER BY sea_fretes.fre_id
thanks!
RR
Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
INNER JOIN help
-
- Posts: 6
- Joined: Fri Mar 29, 2013 11:14 pm
Re: INNER JOIN help
the join worked after I changed the name of the FK field to be different from the PK of the second table.
SELECT *
FROM sea_fretes
JOIN sea_forn_contatos
ON contato_id = forcon_id
SELECT *
FROM sea_fretes
JOIN sea_forn_contatos
ON contato_id = forcon_id