Jump to content

Archived

This topic is now archived and is closed to further replies.

benjam

Double pipe ( || ) in MySQL?

Recommended Posts

I came across a query with a double pipe ( || ) in it and was wondering if the double pipe means anything in MySQL or if the designer meant ( OR ) and mistook it for PHP?

Share this post


Link to post
Share on other sites
http://dev.mysql.com/doc/refman/5.0/en/logical-operators.html

Share this post


Link to post
Share on other sites
check out the [url=http://dev.mysql.com/doc/refman/5.0/en/logical-operators.html]logical operators page[/url] of the mysql manual. 'OR' and '||' are both accepted currently as logical [b]or[/b] operators.

*doh - effigy's too quick ;)

Share this post


Link to post
Share on other sites
I thought it might be, but when I did a search for || it returned nothing.

Thanks.

Share this post


Link to post
Share on other sites
Remember that they have the same precedence (unlike in Perl).

Share this post


Link to post
Share on other sites
[quote author=fenway link=topic=110403.msg446316#msg446316 date=1159908795]
Remember that they have the same precedence (unlike in Perl).
[/quote]
...or PHP ;)

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.