Paul Wisén writes:
> This works:
>
> mysql> select trim('foo' FROM 'foobaar');
> +----------------------------+
> | trim('foo' FROM 'foobaar') |
> +----------------------------+
> | baar |
> +----------------------------+
> 1 row in set (0.00 sec)
>
> This does not work: !
>
> mysql> select trim('foo' FROM 'foo');
> +------------------------+
> | trim('foo' FROM 'foo') |
> +------------------------+
> | foo |
> +------------------------+
> 1 row in set (0.00 sec)
>
> I was expecting a null string from this one.. But nope ??
>
> Why ? Is it a bug?
Hi!
Since 'foo' in your latter case is neither strictly a prefix or suffix (as defined
by the TRIM() documentation); I'm not sure if this a bug in the code
or something that needs to be clarified in the documentation.
Monty?
Matt
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Matt Wagner <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/
/_/ /_/\_, /___/\___\_\___/ River Falls, Wisconsin, USA
<___/ Developer
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php