Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Application and Web Development > PHP

Reply
 
LinkBack Thread Tools Display Modes
Old 11-28-2004, 01:47 PM   #1 (permalink)
CrossMediaGroup
Registered User
 
CrossMediaGroup's Avatar
 
Join Date: Sep 2004
Location: Northeast Ohio, USA
Posts: 7
CrossMediaGroup is on a distinguished road
Send a message via ICQ to CrossMediaGroup Send a message via Yahoo to CrossMediaGroup
Question Fatal error: Call to a member function on a non-object

Can anyone help me with the following error:

Fatal error: Call to a member function on a non-object
in /home/username/public_html/business/admin/modules/topics.php on line 22

I think it occurs here:

Code:
20: global $prefix, $db;
21: $aid = substr("$aid", 0,25);
22: $row = $db->sql_fetchrow($db->sql_query("SELECT radmintopic, 
      radminsuper FROM ".$prefix . "_authors WHERE aid='$aid'"));
23: if (($row['radmintopic'] == 1) OR ($row['radminsuper'] == 1)) {
CrossMediaGroup is offline   Reply With Quote
Old 11-28-2004, 02:40 PM   #2 (permalink)
idx
Senior Grasshopper
 
idx's Avatar
 
Join Date: Jun 2003
Location: FL
Posts: 317
idx is on a distinguished road
Without really seeing the code, my guess is that the $db object was never created.

-r
idx is offline   Reply With Quote
Old 11-28-2004, 02:46 PM   #3 (permalink)
CrossMediaGroup
Registered User
 
CrossMediaGroup's Avatar
 
Join Date: Sep 2004
Location: Northeast Ohio, USA
Posts: 7
CrossMediaGroup is on a distinguished road
Send a message via ICQ to CrossMediaGroup Send a message via Yahoo to CrossMediaGroup
Lightbulb Found the problem

A case file had some code that was tempered with. I fixed it. Thanks.
CrossMediaGroup is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
operate overloading member function in C# sureshkumar_kc MS Technologies ( ASP, VB, C#, .NET ) 2 10-15-2004 02:36 AM
C# member function sureshkumar_kc MS Technologies ( ASP, VB, C#, .NET ) 2 10-15-2004 02:08 AM
How to check if a member is logged in? prendo PHP 4 04-10-2003 08:48 AM


All times are GMT -8. The time now is 02:28 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting