Re: [PHP-DB] NULL to 0

2010-07-17 Thread Andrés G . Montañez
SELECT IFNULL(SUM(`my_Bible_trivia_knowledge_questions_answered`.`score`), 0) AS total_score, IFNULL(`my_Bible_trivia_knowledge_profile`.`questions_answered`, 0) AS questions_answered In these cases you must use the IFNULL function, for testing the value. -- Andrés G. Montañez Zend Certified

[PHP-DB] NULL to 0

2010-07-17 Thread Ron Piggott
What modification does this query need that if either total_score or questions_answered have a value of "NULL" that it will be changed to 0 ("ZERO") Ron SELECT SUM(`my_Bible_trivia_knowledge_questions_answered`.`score`) AS total_score, `my_Bible_trivia_knowledge_profile`.`questions_answered` FRO