Hi,
I'm learning PDO, and I'm getting an error ...
Fatal error: Call to a member function fetchAll() on a non-object in /Library/WebServer/Documents/test/php_Sessions.php on line 99
include("php_web.php");
$db = db_connect();
$txt_sql=" SELECT * FROM web WHERE id_session = '".$web_sess_id."'";
$result = $db->query($txt_sql);
$rows = $result->fetchAll();
the last line has the error.
basically I want to get all the remaining data from the set into the array.
I found in some examples, that programmers use always the 'prepare' statement, but I think I could do this way, or at least I would like to know why I'm having this error ...
thanks !
raimon