PHP-MySQLi-Database-Class
PHP-MySQLi-Database-Class copied to clipboard
LIKE condition
Hello, First of all, a big thank's to your works!
I want to know if the LIKE condition ca be used with getvalue ? I need to count rows with LIKE condition. Example: ("select count(*) from email_bans where mail_domain LIKE '%$maildomain%'") Thank's for your help
Use rawquery
Or just use where(), this should do the job:
$db->where('mail_domain', '%'.$maildomain.'%', 'like');
$bannedCount = $db->getValue('email_bans', 'count(*)');
It's working thank's for your help!