Problem with Mysql query


  • Default avatar
    sklep    
     8 months ago
    0

    Hi


    I put in the field "Payment History" word "jędzrejewska" and instead of results I got:

    1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'like' SQL=SELECT p.id,p.user_id,p.coupon_id,p.amount_paid,p.payment_date,u.username,p.payment_type,p.payment_details FROM #__aworewards_payment p LEFT JOIN #__users u ON u.id=p.user_id WHERE p.estore="virtuemart" AND (u.username LIKE '%jędrzejewska%' OR u.name LIKE '%jędrzejewska%' OR p.payment_details LIKE '%jędrzejewska%') ORDER BY p.payment_date DESC LIMIT 0, 20


    The same I have in AwoCoupon while looking for coupons.


    PHP 7.0.12
    AwoRewards 2.2.9
    Joomla 3.6.4

    Radek

  • Your avatar
    seyi    
     8 months ago
    0

    Hello,

    in www/administrator/components/com_aworewards/models/payment.php, line 51 is this:

    <?php
                $search 
    $this->_db->Quote'%'.strtolower(aworewards::dbEscape$searchtrue )).'%'false );
    ?>

    Please change it to this:

    <?php
                $search 
    $this->_db->Quote'%'.aworewards::dbEscape$searchtrue ).'%'false );
    ?>

    That should fix it.


  • Default avatar
    sklep    
     8 months ago
    0

    Hi

    After changing and clearing cache of backend I got in Aworewards "payment history":

    1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'like' SQL=SELECT p.id,p.user_id,p.coupon_id,p.amount_paid,p.payment_date,u.username,p.payment_type,p.payment_details FROM #__aworewards_payment p LEFT JOIN #__users u ON u.id=p.user_id WHERE p.estore="virtuemart" AND (u.username LIKE '%jędrzejewska%' OR u.name LIKE '%jędrzejewska%' OR p.payment_details LIKE '%jędrzejewska%') ORDER BY p.payment_date DESC LIMIT 0, 20

    In AwoCoupon "Coupons":

     Illegal mix of collations (latin1_bin,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'like' SQL=SELECT c.id,c.coupon_code,c.num_of_uses_total,c.num_of_uses_customer,c.coupon_value_type, c.coupon_value,c.coupon_value_def,c.upc, c.min_value,c.discount_type,c.user_type,c.function_type,c.startdate,c.expiration,c.order_id,c.published, 0 as usercount,0 as asset1count,0 as asset2count,c.exclude_giftcert,c.note, c.parent_type,c.params, GROUP_CONCAT(t.tag separator ", ") as coupon_tags FROM #__awocoupon c LEFT JOIN #__awocoupon_tag t ON t.coupon_id=c.id WHERE estore="virtuemart" AND (LOWER(c.coupon_code) LIKE '%jędrzejewska%' OR c.note LIKE '%jędrzejewska%' OR c.upc LIKE '%jędrzejewska%') GROUP BY c.id ORDER BY c.coupon_code LIMIT 0, 20

    Radek

  • Your avatar
    seyi    
     8 months ago
    0

    Please send a private message with temp admin and ftp access and I can have a look.  I cant reproduce this any more.