Ver Mensaje Individual
  #6 (permalink)  
Antiguo 09/05/2012, 16:21
vBArgentina
 
Fecha de Ingreso: octubre-2010
Ubicación: Mountain View, United States.
Mensajes: 87
Antigüedad: 13 años, 6 meses
Puntos: 1
Respuesta: Conteo multitabla

No consigo hacerlo funcionar bien.

Te dejo la estructura de las dos tablas.

TABLA COMMENTS
Código TXT:
Ver original
  1. +------------+---------+------+-----+---------+----------------+
  2. | Field      | Type    | Null | Key | Default | Extra          |
  3. +------------+---------+------+-----+---------+----------------+
  4. | id         | int(11) | NO   | PRI | NULL    | auto_increment |
  5. | id_noticia | int(11) | NO   |     | NULL    |                |
  6. | time       | text    | NO   |     | NULL    |                |
  7. | nombre     | text    | NO   |     | NULL    |                |
  8. | email      | text    | NO   |     | NULL    |                |
  9. | show-email | int(2)  | NO   |     | NULL    |                |
  10. | status     | int(2)  | NO   |     | NULL    |                |
  11. | comment    | text    | NO   |     | NULL    |                |
  12. | ip         | text    | NO   |     | NULL    |                |
  13. | fecha      | text    | NO   |     | NULL    |                |
  14. | hora       | text    | NO   |     | NULL    |                |
  15. | neg        | int(11) | NO   |     | 0       |                |
  16. | pos        | int(11) | NO   |     | 0       |                |
  17. +------------+---------+------+-----+---------+----------------+
TABLA RESPONSES
Código TXT:
Ver original
  1. +------------+---------+------+-----+---------+----------------+
  2. | Field      | Type    | Null | Key | Default | Extra          |
  3. +------------+---------+------+-----+---------+----------------+
  4. | id         | int(11) | NO   | PRI | NULL    | auto_increment |
  5. | id_noticia | int(11) | NO   | MUL | NULL    |                |
  6. | id_comment | int(11) | NO   |     | NULL    |                |
  7. | time       | text    | NO   |     | NULL    |                |
  8. | nombre     | text    | NO   |     | NULL    |                |
  9. | email      | text    | NO   |     | NULL    |                |
  10. | status     | int(2)  | NO   |     | NULL    |                |
  11. | response   | text    | NO   |     | NULL    |                |
  12. | ip         | text    | NO   |     | NULL    |                |
  13. | fecha      | text    | NO   |     | NULL    |                |
  14. | hora       | text    | NO   |     | NULL    |                |
  15. | pos        | int(11) | NO   |     | 0       |                |
  16. | neg        | int(11) | NO   |     | 0       |                |
  17. +------------+---------+------+-----+---------+----------------+