HELP on SQL
| From: | Andre | Date: | Mon, 27 Sep 2004 14:34:06 +0000 |
| Subject: | HELP on SQL | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-197961@lists.php.net to get a copy of this message | ||
Hello I need some help on this SQL.
SELECT t1.factura_id
FROM factura t1, factura_conteudo t2, recibo_conteudo t4 WHERE t1.cliente_id
= 1 AND t1.factura_id = t2.factura_id AND ( t4.documento_id <> t1.factura_id
AND t4.valor_liquidado = "total" ) GROUP BY t1.factura_numero LIMIT 0, 30;
This SQL do this result:
factura_id
1
2
49
50
51
52
53
54
55
56
And the result I need is this
factura_id
2
50
51
52
53
54
55
56
How can I do the SQL because the factura_id => 1 and 49 have the value
'total'