Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: How to get a placeholder to keep the current column value?

by giulienk (Curate)
on Oct 27, 2003 at 08:07 UTC ( #302354=note: print w/ replies, xml ) Need Help??


in reply to Re: How to get a placeholder to keep the current column value?
in thread How to get a placeholder to keep the current column value?

It seems that MySQL's COALESCE allows to input NULL values as if all the values are NULL, NULL will be returned.

I quote from MySQL Manual:

COALESCE(list)
    Returns first non-NULL element in list:

mysql> SELECT COALESCE(NULL,1);
        -> 1
mysql> SELECT COALESCE(NULL,NULL,NULL);
        -> NULL

UPDATE: ops, i wasn't careful enough to check the solution offered. In that case NULL won't be returned so Jenda's assumption is right.


$|=$_="1g2i1u1l2i4e2n0k",map{print"\7",chop;select$,,$,,$,,$_/7}m{..}g


Comment on Re: Re: How to get a placeholder to keep the current column value?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://302354]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2015-07-30 09:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls