No sabría que decirte. haciendo pruebas con pocos registros fijate bien:
Código mysql:
Ver original -> where tabla1.desregistrado
= 0; +----+---------+--------+-------+---------------+---------------------+---------+------------+----------+
| id | id_foro | nombre | mail | desregistrado | fechaingreso | mailmd5 | id_usuario | id_grupo |
+----+---------+--------+-------+---------------+---------------------+---------+------------+----------+
| 1 | 1 | daniel | mail1 | 0 | 2009-11-10 10:19:43 | mail1 | 1 | 1 |
| 1 | 1 | daniel | mail1 | 0 | 2009-11-10 10:19:43 | mail1 | 1 | 2 |
| 1 | 1 | daniel | mail1 | 0 | 2009-11-10 10:19:43 | mail1 | 1 | 3 |
| 1 | 1 | daniel | mail1 | 0 | 2009-11-10 10:19:43 | mail1 | 1 | 4 |
| 2 | 1 | daniel | mail2 | 0 | 2009-11-10 10:19:51 | mail2 | 2 | 4 |
| 3 | 1 | daniel | mail3 | 0 | 2009-11-10 10:20:00 | mail3 | 3 | 4 |
| 4 | 1 | daniel | mail4 | 0 | 2009-11-10 10:20:46 | mail4 | 4 | 4 |
+----+---------+--------+-------+---------------+---------------------+---------+------------+----------+
Sin condición muestra 7 registros.
Código mysql:
Ver original -> where tabla1.desregistrado
= 0 and tabla2.id_grupo
= 4; +----+---------+--------+-------+---------------+---------------------+---------+------------+----------+
| id | id_foro | nombre | mail | desregistrado | fechaingreso | mailmd5 | id_usuario | id_grupo |
+----+---------+--------+-------+---------------+---------------------+---------+------------+----------+
| 1 | 1 | daniel | mail1 | 0 | 2009-11-10 10:19:43 | mail1 | 1 | 4 |
| 2 | 1 | daniel | mail2 | 0 | 2009-11-10 10:19:51 | mail2 | 2 | 4 |
| 3 | 1 | daniel | mail3 | 0 | 2009-11-10 10:20:00 | mail3 | 3 | 4 |
| 4 | 1 | daniel | mail4 | 0 | 2009-11-10 10:20:46 | mail4 | 4 | 4 |
+----+---------+--------+-------+---------------+---------------------+---------+------------+----------+
Con condición =4 muestra 4.
Código mysql:
Ver original -> where tabla1.desregistrado
= 0 and tabla2.id_grupo
<> 4; +----+---------+--------+-------+---------------+---------------------+---------+------------+----------+
| id | id_foro | nombre | mail | desregistrado | fechaingreso | mailmd5 | id_usuario | id_grupo |
+----+---------+--------+-------+---------------+---------------------+---------+------------+----------+
| 1 | 1 | daniel | mail1 | 0 | 2009-11-10 10:19:43 | mail1 | 1 | 1 |
| 1 | 1 | daniel | mail1 | 0 | 2009-11-10 10:19:43 | mail1 | 1 | 2 |
| 1 | 1 | daniel | mail1 | 0 | 2009-11-10 10:19:43 | mail1 | 1 | 3 |
+----+---------+--------+-------+---------------+---------------------+---------+------------+----------+
Con condición <>4 muestra 3.
Desde donde haces las pruebas?
directamente en mysql o desde el lenguaje de programación?