Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-23-2009, 04:03 AM   PM User | #1
vickoy23
New Coder

 
Join Date: Feb 2009
Posts: 32
Thanks: 5
Thanked 0 Times in 0 Posts
vickoy23 is an unknown quantity at this point
does "&" and "and" mean thesame thing in MySql?

I am asking this because my code is supposed to query mysql database and return rows with the word "and" and not "&" but it does return rows that has either of them present. So, I am wondering if mysql do interchange the word "and" for "&".
vickoy23 is offline   Reply With Quote
Old 02-23-2009, 04:06 AM   PM User | #2
`Jeremy
New Coder

 
Join Date: Feb 2009
Posts: 32
Thanks: 0
Thanked 4 Times in 4 Posts
`Jeremy is an unknown quantity at this point
Post your query.
`Jeremy is offline   Reply With Quote
Old 02-23-2009, 04:09 AM   PM User | #3
oesxyl
Master Coder


 
Join Date: Dec 2007
Posts: 6,682
Thanks: 436
Thanked 890 Times in 879 Posts
oesxyl is a jewel in the roughoesxyl is a jewel in the roughoesxyl is a jewel in the rough
Quote:
Originally Posted by vickoy23 View Post
I am asking this because my code is supposed to query mysql database and return rows with the word "and" and not "&" but it does return rows that has either of them present. So, I am wondering if mysql do interchange the word "and" for "&".
and and && means same thing. & is bitwise operator not a logical and.

best regards
oesxyl is offline   Reply With Quote
Old 02-24-2009, 12:34 AM   PM User | #4
guelphdad
Super Moderator


 
guelphdad's Avatar
 
Join Date: Mar 2006
Location: St. Catharines, Ontario Canada
Posts: 2,629
Thanks: 4
Thanked 147 Times in 138 Posts
guelphdad will become famous soon enoughguelphdad will become famous soon enough
also note that && is not standard sql and not portable as a result. Stick to using AND.
guelphdad is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:22 AM.


Advertisement
Log in to turn off these ads.