Re: NULL to 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Thanks, Ron

--




-----Original Message-----
From: Andrés G. Montañez <andresmontanez@xxxxxxxxx>
To: ron.piggott@xxxxxxxxxxxxxxxxxx
Cc: php-db@xxxxxxxxxxxxx
Subject: Re: NULL to 0
Date: Sat, 17 Jul 2010 23:20:20 -0300

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 Engineer
Montevideo - Uruguay

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux