Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Feb 2009
    Posts
    32
    Thanks
    5
    Thanked 0 Times in 0 Posts

    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 "&".

  2. #2
    New Coder
    Join Date
    Feb 2009
    Posts
    32
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Post your query.

  3. #3
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    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

  4. #4
    Super Moderator guelphdad's Avatar
    Join Date
    Mar 2006
    Location
    St. Catharines, Ontario Canada
    Posts
    2,669
    Thanks
    6
    Thanked 150 Times in 141 Posts
    also note that && is not standard sql and not portable as a result. Stick to using AND.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •