I have a little problem, I don't understand.
I have this code :
public function formAlreadySent($demande){
$data = odbc_exec($this->dbConnection,"SELECT COUNT(*) FROM [@JDC_QSTR] WHERE U_Demande = ".$demande);
$nombre = odbc_fetch_array($data);
print_r($nombre);
if($nombre[0] > 0)
return true;
else
return false;
}
The result of my print_r
is :
Array ( [0] => 0 )
But I got this error :
Notice: Undefined offset: 0 in C:\wamp\www\enquetesatisfaction\libs\model\QuestionsManager.class.php on line 89
Line 89 is :
if($nombre[0] > 0)
If someone know why this problem happen ?
Thanks in advance !