-2
Error:
/* Erro SQL (1064): 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 'FROM pedido a,
tipofornecimento b
' at line 7 */
/* Affected rows: 0 Registros encontrados: 0 Avisos: 0 Duração de 0 of 1 query: 0,000 sec. */
Consultation:
$sql = "(SELECT
a.id,
a.cliente_id,
a.arquiteto_id,
a.vendedor_id,
b.nome as tipofornecimento,
FROM {$this->t_pedido} a,
{$this->t_tipofornecimento} b
WHERE
a.fornecimento_id = b.id
{$where})
UNION ALL
(SELECT
c.id,
'a',
'b',
'c',
c.valor as valor
FROM {$this->t_devolucaoparcelas} c,
{$this->t_movimentos} d
WHERE
c.devolucao_id = d.id)
";
Only one caveat the UNION problem is in the SQL database, not PHP
– Otto