public function getLocateExpression($str, $substr, $startPos = false) { if ($startPos == false) { return 'INSTR(' . $str . ', ' . $substr . ')'; } return 'INSTR(' . $str . ', ' . $substr . ', ' . $startPos . ')'; }