<?php $connection = $this->getConnection(); $select = $connection->select(); $select = $model->getCollection() ->select() ->count() ->from($this->getDbPrefix() . 'name_table', '*') ->where('result', ' likes%'); return (int)$objectManager->fetchOne($select); ?>
I want SELECT COUNT (*) FROM name_table WHERE result LIKE 'likes%' to be executed, and a numeric value is displayed on the page.How do I do it? I'm a beginner. I'll be very grateful for your help!