On 16 Apr 2002, at 10:58, Jon Frisby wrote: > String literals in a truth test such as you set up are coerced to integers. > (A la C's 'atoi()' function.) [snip] > If you're used to weakly-typed languages, such as Perl this is fairly > typical behavior although it does seem counterintuitive in the context of > SQL.
Actually, if you're used to Perl the behavior seems strange, since strings are true in Perl unless they're '' or '0'. Perl does coerce strings to integers as you say, but only in integer context, which in Perl is separate from boolean context. -- Keith C. Ivey <[EMAIL PROTECTED]> Tobacco Documents Online http://tobaccodocuments.org --------------------------------------------------------------------- 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