Why is this not left?

I'm having problems with this block of code. The error is next to LIKE. This is the code ...

try {
    $st = $db->query('SELECT', "SELECT a.`fast_cash` as `fast`, a.`urgent_cash` as `urgent`, b.`store_name` as `store` FROM `Locations` a LEFT JOIN `loan_balances` b ON b.`store_name` LIKE '%' + a.`nick` + '%'", 'array'); 
} catch (Exception $e) {
    echo $e->getMessage();
}
+4
source share
1 answer

The offer onyou are looking for is:

ON b.`store_name` LIKE concat('%', a.`nick`, '%')

No request is required for this request where.

+2
source

Source: https://habr.com/ru/post/1548533/


All Articles