SteveDave Posted March 16, 2009 Posted March 16, 2009 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! Quote
Lithium Posted March 16, 2009 Posted March 16, 2009 Re: Car Mod Help $db->query("query") and not $db->query("query",$c) Quote
SteveDave Posted March 16, 2009 Author Posted March 16, 2009 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.. Quote
AlabamaHit Posted March 17, 2009 Posted March 17, 2009 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). Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.