Jump to content

Help with sudden Fatal error: Call to a member function query() on a non-object


Lisa1983

Recommended Posts

Everything was working on the site until this morning - I made no changes, nor did my client. I am completly lost as to why it is coming up with - Fatal error: Call to a member function query() on a non-object in /lst_rcd.php on line 6

 

The following code is the list code:

<?php

require_once('./include/db_cnct.php');// begin reading the table to output results the the screen.

 

$sql = 'SELECT * FROM branches ORDER BY date_entr';

 

if( !$rssrslt = $db->query($sql) ) {

    message_die(GENERAL_ERROR, "table read error", "",__LINE__, __FILE__, $sql);

}

 

while ($arr = $rssrslt->fetchrow()) {

    $row[]=$arr;

}

$max_elements = count($row);

for ($i = 0; $i < $max_elements; $i++) {

  $blstng = ($row[$i]['branchname']);

   

  $el_line .= (($i+1).'.) '.$blstng.'<br/>');

}

 

echo ('<div id="records"><p>'.$el_line.'</p></div>');

It needs to load the list not an rssfeed. It was working no changes made and now it errors out. THIS IS URGENT....Client needs fixed by 5/15/09.

Thank you for your help.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.