I would like to use a LIKE form of query in SQL to auto-implement a text field with this php function :
function getNumOFAutoImplement($chaine){
$o_CAD = new connect();
$sql = 'SELECT * FROM tb_numero_affaire WHERE numero_OF LIKE \':numof%\'';
$param = array(":numof"=>$chaine);
$result = $o_CAD->read($sql, $param);
return $result;
}
The function is working well went I use this request in my function :
$sql = 'SELECT * FROM tb_numero_affaire WHERE numero_OF LIKE :numof';
It's also working when I directly past the following line in the phpMyAdmin SQL box :
SELECT * FROM tb_numero_affaire WHERE numero_OF LIKE '%456%';