Caius Posted May 30, 2012 Posted May 30, 2012 (edited) I'm getting the following errors. I followed the instruction file, and I am getting the following errors on each page. I should point out that I had an error with it pointing to 'mysql.php' instead of the 'config.php'. So I cloned the config and its handled most of the problems. Now I get the following errors: When I try and add something: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/username/domain.com/auctionadd.php on line 11 When I visit auctions.php: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/username/domain.com/auctions.php on line 11 Error: Seems like every error I'm getting about this mod is all related to the same problem. If I can figure out this problem everything should be smooth. Any advice? Thanks Edited May 30, 2012 by Caius Quote
KyleMassacre Posted May 30, 2012 Posted May 30, 2012 (edited) I had the same issue but only some of the time and what I did since you are using V2 change mysql_query to $db->query you may want to look into changing all the mysql arguments to the $db arguments and you can find all the conversions here http://makewebgames.io/showthread.php/22326-Tutorial-v1-v2-Conversion I dont know why but it did work for me so hopefully it will work for you, ive asked about this thing to numerous people and everyone says it doesnt make sense it should work cause it does the same thing Edited May 30, 2012 by KyleMassacre Quote
Caius Posted May 30, 2012 Author Posted May 30, 2012 Kyle, I'll give it a try and let you know if that works. Thanks man! Once I get this fixed time to browse the marketplace and buy up more mods. What are you running right now? I think the crafting mod looks great next. Quote
KyleMassacre Posted May 30, 2012 Posted May 30, 2012 (edited) Good luck with that and please do share if it works or not Edited May 30, 2012 by KyleMassacre Ughh typos (using swipe) Quote
Caius Posted May 30, 2012 Author Posted May 30, 2012 Some of it worked kyle, everything works except the bid page for some reason take a look. The only left is the following error when I try and bid on an item? Can't figure this one out. I followed the instructions in the thread you provided. Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/username/domain.com/placebid.php on line 11 Here's the code on the line above and below: $item=$db->query("SELECT a.*,i.* FROM auctions a LEFT JOIN items i ON a.itemname=i.itmid where aid=$aid",$c); $ie=mysql_fetch_array($item); Quote
Cronus Posted May 30, 2012 Posted May 30, 2012 $ie=mysql_fetch_array($item); should be $ie=$db->fetch_row($item); Quote
KyleMassacre Posted May 30, 2012 Posted May 30, 2012 $ie=mysql_fetch_array($item); should be $ie=$db->fetch_row($item); Yep that should be it, further along in that post is all the conversions for the different queries. And see Cronus it wasnt just me I feel better now haha Quote
Cronus Posted May 30, 2012 Posted May 30, 2012 pretty stupid that thenormal mysql_ isn't allowed without an error, IMO major setback to the "update" Quote
KyleMassacre Posted May 30, 2012 Posted May 30, 2012 I tried a mod I was having issues with on a free server and it worked great even my inventory items showed up in the dropdown which is really wierd Quote
Dabomstew Posted May 30, 2012 Posted May 30, 2012 mysql_ isn't allowed without an error only if the client uses mysqli on install which has ALWAYS been an option. It's just that before the patches mysqli was broken for other reasons than just mod compatibility so pretty much no-one used it, making mods with mysql_ work fine 99% of the time. Anyways, people releasing v2/Redux mods with mysql_ instead of $db-> is just lazy coding and such mods marked as v2 or Redux and submitted to the marketplace will not be approved. Quote
Dabomstew Posted May 30, 2012 Posted May 30, 2012 Yeah but those small speed increases are *almost* negligible compared to the other parts of a script. You do raise a fair point, but it's hardly necessary to cut out some purchasers (or make them have to change things themselves) for the sake of such small gains. We don't want to limit freedom of creativity on the marketplace (besides anything illegal of course) but changing mysql_ to $db-> doesn't take long and makes sure neither we nor the sellers get this type of support request. Quote
KyleMassacre Posted May 30, 2012 Posted May 30, 2012 Its just really odd that one day im navigating through my page fine and dandy and they next day some of my pages are error infested and I mean literally "the next day" Here is a post I made about it a little while back http://makewebgames.io/showthread.php/41663-mysql_query-errors?p=275178 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.