URBANZ Posted February 12, 2020 Posted February 12, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia 4 Quote
URBANZ Posted February 12, 2020 Author Posted February 12, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia Quote
URBANZ Posted February 13, 2020 Author Posted February 13, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia 1 Quote
KyleMassacre Posted February 13, 2020 Posted February 13, 2020 For your class like that (especially with classes like GRPG V1) you could use the __get($var) magic method to retrieve all your stats so that you don’t have to keep editing your array each time you make a change to the database Quote
URBANZ Posted February 13, 2020 Author Posted February 13, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia Quote
KyleMassacre Posted February 13, 2020 Posted February 13, 2020 9 hours ago, urbanmafia said: im playing around with the classes currently and changing them. For the stats ive decided to just go with this to save editing it all the time public function getStats() { $stmt = $this->db->prepare("SELECT * FROM user_stats WHERE US_id = (:id) LIMIT 1"); $stmt->bindParam(":id", $this->id, PDO::PARAM_INT); if($stmt->execute()): if($stmt->rowCount() > 0): $result = $stmt->fetch(); endif; endif; return $result; } public function getStats() { $stmt = $this->db->prepare("SELECT * FROM user_stats WHERE US_id = (:id) LIMIT 1"); $stmt->bindParam(":id", $this->id, PDO::PARAM_INT); if($stmt->execute()): if($stmt->rowCount() > 0): $result = $stmt->fetch(); endif; endif; return $result; } Ok, I see what you are doing there. One more recommendation: You should return a result if nothing is found for whatever reason. If there isn’t any rows, it returns absolutely nothing at all because $result is only defined if there are rows found Quote
URBANZ Posted February 13, 2020 Author Posted February 13, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia Quote
Magictallguy Posted February 13, 2020 Posted February 13, 2020 3 hours ago, KyleMassacre said: [...] If there isn’t any rows, it returns absolutely nothing at all because $result is only defined if there are rows found With strict standards, it'd throw an error (Undefined variable: result) Quote
URBANZ Posted February 13, 2020 Author Posted February 13, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia Quote
KyleMassacre Posted February 13, 2020 Posted February 13, 2020 5 hours ago, Magictallguy said: With strict standards, it'd throw an error (Undefined variable: result) Well besides that lol Quote
URBANZ Posted February 14, 2020 Author Posted February 14, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia Quote
ags_cs4 Posted February 14, 2020 Posted February 14, 2020 hey good luck with the recoding, and for feedback not a big fan of the header, but over all looking dope good job 👍 Quote
URBANZ Posted February 14, 2020 Author Posted February 14, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia Quote
KyleMassacre Posted February 14, 2020 Posted February 14, 2020 I think it is too much bright red. It may need just a tad bit more color and tone down the red color a little. Maybe make it a “gradient” Quote
ags_cs4 Posted February 14, 2020 Posted February 14, 2020 @urbanmafia nah i dont think any thing else need to be changed , but maybe the background need to be different than the tbale content? but so far its good Quote
URBANZ Posted February 16, 2020 Author Posted February 16, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia 1 Quote
Dave Posted February 16, 2020 Posted February 16, 2020 I'd be happy to donate you some free MakeWebGames hosting with a sub-domain to host a demo for the community if you'd like. PM me if you're interested! 1 Quote
URBANZ Posted February 16, 2020 Author Posted February 16, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia 2 Quote
Dave Posted February 16, 2020 Posted February 16, 2020 41 minutes ago, urbanmafia said: Thankyou dave for the offer im currently hosting it on my dedicated server might be a good idea to host it here after it is completed. The demo should be released around Wednesday after the base is all finished. Okay great! You do whatever you thinks best, excited to see it. Will it be open source? Quote
URBANZ Posted February 16, 2020 Author Posted February 16, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia 3 Quote
Canjucks Posted May 26, 2020 Posted May 26, 2020 (edited) Did you end up uploading to GitHub? Edited May 26, 2020 by padre Quote
URBANZ Posted May 26, 2020 Author Posted May 26, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia 4 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.