diff --git a/src/controllers/InvoicesController.php b/src/controllers/InvoicesController.php index 46e4468..1b3f84c 100644 --- a/src/controllers/InvoicesController.php +++ b/src/controllers/InvoicesController.php @@ -66,10 +66,11 @@ public function actionTableData(): Response // searching if ($search) { + $isPgsql = Craft::$app->getDb()->getIsPgsql(); $sqlQuery->andWhere([ 'or', - ['like', "stripe_invoicedata.number", $search], - ['like', "stripe_invoicedata.customerEmail", $search], + [$isPgsql ? 'ilike' : 'like', "stripe_invoicedata.number", $search], + [$isPgsql ? 'ilike' : 'like', "stripe_invoicedata.customerEmail", $search], ]); }