Notice: Trying to access array offset on value of type null in /var/www/html/creditcard-entry.com/www/inc/function.mysqli.inc on line 31

Notice: Trying to access array offset on value of type null in /var/www/html/creditcard-entry.com/www/inc/function.mysqli.inc on line 31

select card.crid from card, ranking where card.crid = ranking.crid and card.disp = 1 and card.company_ = order by ranking.total limit 0,20

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'order by ranking.total limit 0,20' at line 1