I have this original sql in my file:
$sql = "SELECT id FROM tags_standard WHERE name SOUNDS LIKE '" . $q . "'";
$result = new Resultset(null, $this,
$this->getReadConnection()->query($sql, array()));
I know I should do prepare statement but I am not sure how to bind the param or how to execute it, so far I have this:
$di = \Phalcon\DI::getDefault();
$db = $di->get('db');
$sql = $db->prepare("SELECT id FROM tags_standard WHERE name SOUNDS LIKE '" . $q . "'");
Can anyone help me out?