Sebastian <[EMAIL PROTECTED]> wrote on 06/05/2005 02:23:45 AM:
> I have two fields: topic | title
> topic does not always have data in it, so i want to select `title` when
> `topic` is null..
> i thought i could do this (does not work):
> IF(title IS NULL, topic, title) AS heading
> Thanks.
Y
Sebastian wrote:
I have two fields: topic | title
topic does not always have data in it, so i want to select `title` when
`topic` is null..
i thought i could do this (does not work):
IF(title IS NULL, topic, title) AS heading
Thanks.
There is nothing wrong with this, as long as it is par
Sebastian wrote:
I have two fields: topic | title
topic does not always have data in it, so i want to select `title` when
`topic` is null..
i thought i could do this (does not work):
IF(title IS NULL, topic, title) AS heading
Thanks.
Try
SELECT IFNULL(title, topic) AS heading
-Simon
-
I have two fields: topic | title
topic does not always have data in it, so i want to select `title` when
`topic` is null..
i thought i could do this (does not work):
IF(title IS NULL, topic, title) AS heading
Thanks.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/my