Okay
  Public Ticket #3125606
Illegal mix of collations
Closed

Comments

  • Andrew started the conversation

    Hi,

    I have this SQL query

    SELECT `Room`, COUNT(`Nights`) AS 'Total Bookings', COUNT(`booking.com`) AS 'Bookings from B.C', SUM(DATEDIFF(LEAST(`Check Out`, %VAR2%),GREATEST(`Check In`,%VAR1%))) AS 'Total Nights Booked', DATEDIFF(%VAR2%,%VAR1%)+1 AS 'Total Available Nights'
    FROM `accommodation_bookings` WHERE (`Check In` <= %VAR2% AND `Check Out` >= %VAR1%) AND `Status`='Confirmed'
    GROUP BY `availabilityId`

    Which used to work in wpdatatables but at some point stopped working and I now get the error

    MySQL said: Illegal mix of collations (utf8mb4_unicode_ci,COERCIBLE) and (utf8mb4_unicode_520_ci,COERCIBLE) for operation '=
    The same SQL query works perfectly in phpMyAdmin

    The comparison causing the issue is `Status`='Confirmed'

    status varchar(9) utf8mb4_unicode_ci

    How do I fix this?

    Thanks

    Andy

  •  1,568
    Uroš replied

    Hello Andrew,

    Thank you for reaching out to us.

    Please provide me a temporary WP-admin (administrator) user for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. 

    We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course, we do not provide login data to third parties. 

    You can write credentials here just check PRIVATE Reply so nobody can see them except us.

    Kind Regards, 

    Uros Jovanovic
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •   Andrew replied privately
  •   Andrew replied privately
  •   Miloš replied privately
  •   Andrew replied privately
  •   Miloš replied privately