cashpath
04-09-2007, 06:48 PM
I have a funtions include file with $db->query_read in the functions but when the page is called I get
Fatal error: Call to a member function query_read() on a non-object in /home/madden/public_html/forum/league_functions/functions_inc.php on line 191
190: $sql="select t.team as teamname, s.*,((s.win+(s.tie/2))/(s.win+s.loss+s.tie)) as Percent from $table s INNER JOIN $table_2 t ON t.team=s.team WHERE s.week='".$week."' and s.year='".$year."' AND t.conf='".$conf."' AND t.division='".$div."' ORDER by Percent DESC";
191: $teamstanding=$db->query_read($sql) or die("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $sql . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());;
192: while($tresult=mysql_fetch_object($teamstanding)){
Do I just have to use regular mysql_queries in the functions?
Fatal error: Call to a member function query_read() on a non-object in /home/madden/public_html/forum/league_functions/functions_inc.php on line 191
190: $sql="select t.team as teamname, s.*,((s.win+(s.tie/2))/(s.win+s.loss+s.tie)) as Percent from $table s INNER JOIN $table_2 t ON t.team=s.team WHERE s.week='".$week."' and s.year='".$year."' AND t.conf='".$conf."' AND t.division='".$div."' ORDER by Percent DESC";
191: $teamstanding=$db->query_read($sql) or die("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $sql . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());;
192: while($tresult=mysql_fetch_object($teamstanding)){
Do I just have to use regular mysql_queries in the functions?