Fatal error: Call to a member function fetchRow() on a non-object in C:\Xampp\xampp\htdocs...
| From: | j dot kuehne at sign-tronic dot ch | Date: | Tue, 27 Jun 2006 07:51:51 +0000 |
| Subject: | Fatal error: Call to a member function fetchRow() on a non-object in C:\Xampp\xampp\htdocs... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-238684@lists.php.net to get a copy of this message | ||
Hello
I am pleased if someone could explain me the behaviour since is wrong the following function call:
($row = & $result->fetchRow(DB_FETCHMODE_ASSOC,
$_SESSION["searchFormVars"]["offset"]+$rowCounter));
as you will find them on the bottom of the email. By the way, fetchRow() is a method from class
DB(.php). However mysql_fetch_row() should have same functionality but the argument resp. the
identity is different. I hardly try to do not mix up functionality from mysql- with db- members.
mysql_select_db("knowledge", $link);
$query = setupQuery($_SESSION["searchFormVars"]["search"]);
for ( $rowCounter = 0;
($rowCounter < SEARCH_ROWS) &&
(( $rowCounter + $_SESSION["searchFormVars"]["offset"]) <
mysql_num_rows($result)) &&
($row = & $result->fetchRow(DB_FETCHMODE_ASSOC,
$_SESSION["searchFormVars"]["offset"]+$rowCounter));
$rowCounter++)
{
Error message:
Fatal error: Call to a member function fetchRow() on a non-object in
C:\Xampp\xampp\htdocs\www2\knowledge_db\searchnew.php on line
best regards, Georg