Jump to content
MakeWebGames

Recommended Posts

Posted

Hey guys I'm not sure if this mod was released for free as I got it in a package which was labeled as "Free Mods" but still, I am unsure.

Anyway, I was hoping someone could help me with this. I'm having some trouble with a part of the code, I get this error:

Fatal error: Call to a member function query() on a non-object in /home/blah/public_html/test/carmarket.php on line 24

 

Here is the full code (I changed it from V1 to V2, I also had problems adding the SQL and had to manually add some fields in for the Users table. I'm thinking this might have something to do with it? (Sorry, I'm still trying to learn)

Code removed: Paid mod

Thanks in advance!

Posted

Re: Car Mod Help

Hmm, thanks for the help but it didn't seem to fix it.

I believe you meant change:

 

$q=$db->query("SELECT cm.*, u.*,ct.* FROM carmarket cm LEFT JOIN users u ON u.userid=cm.cmADDER LEFT JOIN cars_types ct ON ct.carID=cm.cmCAR ORDER BY cmPRICE ASC",$c);

 

To:

 

$q=$db->query("SELECT cm.*, u.*,ct.* FROM carmarket cm LEFT JOIN users u ON u.userid=cm.cmADDER LEFT JOIN cars_types ct ON ct.carID=cm.cmCAR ORDER BY cmPRICE ASC");

 

..I also tried taking all of the ,$c's out from the entire page but still nothing, same error..

Posted

Re: Car Mod Help

$db is not defined..

By time this is viewable I'm sure someone else would have answered it I saw it yesterday didnt answer cause its on here so much already. And thought someone would do it already.

Each function on the page. has to have the globals defined

example

 

global $ir,$c,$userid,$h;

 

needs to be

 

global $ir,$c,$userid,$h,$db;

 

Oh and this mod is paid....and that zip marked "Mods" that you probarly downloaded from a warez site Not saying name but im 98% sure i know where,...99% of those mods are illegal. (paid mods).

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...