Re: Fatal error: Call to a member function fetchRow() on a non-object in C:\Xampp\xampp\htdocs...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



j.kuehne@xxxxxxxxxxxxxx wrote:
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.

$search = ($_SESSION["searchFormVars"]["search_eb"]);
$link = mysql_connect("localhost", "root", "040573");
mysql_select_db("knowledge", $link);

$query = setupQuery($_SESSION["searchFormVars"]["search"]);
$result=@mysql_query($query);


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

$result is not an object.

mysql_query does not return an object, it returns a resource handler. Maybe you want mysqli_query ?

Read the manual for both of these - there have been 3-4 replies telling you what the problem is.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux