I am new to PHP and PDO. I'm working with Eclipse PDT.
$stmt = $pdo->prepare("SELECT * from articolo");
$stmt->execute();
$result = $stmt->fetchAll(PDO::FETCH_CLASS, "Articolo");
After that I want to be able to type:
$result[0]->
and from there pressing ctrl+space Eclipse should popup the autocomplete with all the members and functions of that class Articolo.
But nothing happens, as if the IDE doesn't know the Class of $result. Am I doing something wrong? Maybe a cast of $result to (Articolo) is needed?
doing:
$var = new Articolo()
$var->
the autocomplete popup appear correctly.