phpbar.de logo

Mailinglisten-Archive

[dbs] Call to undefined method DB::query()

[dbs] Call to undefined method DB::query()

j.kuehne at sign-tronic.ch j.kuehne at sign-tronic.ch
Die Jul 11 16:04:32 CEST 2006


Kann mir jemand weiter helfen? 


function setupQuery($search_eb)
{
... 
}


function showKnowledges($connection, &$template)
{
$template->setCurrentBlock();
$template->setVariable("SUCH-KRITERIUM","Such-Kriterium: {$_SESSION["searchFormVars"]["search_eb"]}");  
$browseString = "search_eb=" . urlencode($_SESSION["searchFormVars"]["search_eb"]);
$query = setupQuery($_SESSION["searchFormVars"]["search_eb"]);     
$result = $connection->query($query);-------------------
--->>>>>Fatal error: Call to undefined method DB::query() in C:\Xampp\xampp\htdocs\www2\knowledge_db\searchnew.php 

    if (DB::isError($result))
        trigger_error($result->getMessage(), E_USER_ERROR);
        $numRows = $result->numRows();
 
...


session_start();  

$template = new knowledgeTemplate(T_SEARCH, P_TITLE);

$connection = new DB();

$connection->connect($dsn, true);

if (DB::isError($connection))
trigger_error($connection->getMessage(), E_USER_ERROR); 

$_SESSION["searchFormVars"]["search_eb"] = 
   pearclean($_GET, "search_eb", 100, $connection); 
if (isset($_GET["offset"]))
  $_SESSION["searchFormVars"]["offeset"] = 
  pearclean($_GET, "offset", 5, $connection);
else 
  $_SESSION["searchFormVars"]["offset"]=0;

showKnowledges($connection, $template);
$template->showKnowledge_db(SHOW_ALL, B_HOME | B_SEARCH); 

php::bar PHP Wiki   -   Listenarchive