SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Nov 2005
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question where age >= 10 works, where age <= 10 doesn't (was "Mysql problem")

    Maybe there's someting wrong with my charset of mysql?

    When I query like this "select * from user where age >=10",I can get the info including age 10;
    But when I query as following "select * from user where age <=10",now I can't get the age 10!

    Just I dump the mysql database from one to another ,it show the wrong infomation like this:
    Wrong info: "#1266 - Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' ";

    Please tell mt what's wrong?
    Things maybe not what you want,but you can achieve what you want!

  2. #2
    SitePoint Evangelist LemoNade's Avatar
    Join Date
    Aug 2005
    Location
    Southampton, UK
    Posts
    500
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I may be wrong, but I think it may have to be: =<

    So:

    Code:
    "SELECT * FROM user WHERE age =<10"
    Worth a try,

    -Will

  3. #3
    SitePoint Guru
    Join Date
    Jan 2004
    Location
    Uppsala, sverige
    Posts
    697
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    What datatype is age defined as?


Bookmarks

Posting Permissions

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