At 18:12 +0100 3/21/03, Stefan Hinz wrote:
David,
I would like to suggest that a third condition be included in this list. It
seems that either of the other 2 comment characters, * -- * or
* # * are
also recognized by the parser within /* ... */.
"-- " means "comment to the end of the line". So,
SELECT "Hello" /* This is a comment -- This one, too */, "World";
Will _not_ output "HelloWorld", but rather "Hello". In the mysql
client program, you will also have to enter a semicolon on the next
line, because the semicolon at the end of the line is part of the
"-- " comment:
mysql> SELECT "Hello" /* This is a comment -- This one, too */, "World";
-> ;
+-------+
| Hello |
+-------+
| Hello |
+-------+
1 row in set (0.00 sec)
This is a lengthy answer for saying "It's documented behaviour" :)
Note that in MySQL 4.1 the mysql parser has been fixed so that
weird characters or comment sequences within /* ... */ are (properly)
treated as part of the comment.
Regards,
--
Stefan Hinz <[EMAIL PROTECTED]>
iConnect GmbH <http://iConnect.de>
Heesestr. 6, 12169 Berlin (Germany)
Telefon: +49 30 7970948-0 Fax: +49 30 7970948-3
[filter fodder: sql, mysql, query]
--
Paul DuBois
http://www.kitebird.com/
sql, query
---------------------------------------------------------------------
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