URBANZ Posted February 12, 2020 Share Posted February 12, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia 4 Quote Link to comment Share on other sites More sharing options...
AdamHull Posted February 12, 2020 Share Posted February 12, 2020 Using md5? Quote Link to comment Share on other sites More sharing options...
URBANZ Posted February 12, 2020 Author Share Posted February 12, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia Quote Link to comment Share on other sites More sharing options...
Dave Posted February 13, 2020 Share Posted February 13, 2020 This looks great! Excited to see a demo Quote Link to comment Share on other sites More sharing options...
URBANZ Posted February 13, 2020 Author Share Posted February 13, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia 1 Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted February 13, 2020 Share 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 Link to comment Share on other sites More sharing options...
URBANZ Posted February 13, 2020 Author Share Posted February 13, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted February 13, 2020 Share 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 Link to comment Share on other sites More sharing options...
URBANZ Posted February 13, 2020 Author Share Posted February 13, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted February 13, 2020 Share 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 Link to comment Share on other sites More sharing options...
URBANZ Posted February 13, 2020 Author Share Posted February 13, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted February 13, 2020 Share 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 Link to comment Share on other sites More sharing options...
URBANZ Posted February 14, 2020 Author Share Posted February 14, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia Quote Link to comment Share on other sites More sharing options...
ags_cs4 Posted February 14, 2020 Share 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 Link to comment Share on other sites More sharing options...
URBANZ Posted February 14, 2020 Author Share Posted February 14, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted February 14, 2020 Share 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 Link to comment Share on other sites More sharing options...
ags_cs4 Posted February 14, 2020 Share 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 Link to comment Share on other sites More sharing options...
CodePlease Posted February 14, 2020 Share Posted February 14, 2020 I like it! Quote Link to comment Share on other sites More sharing options...
URBANZ Posted February 16, 2020 Author Share Posted February 16, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia 1 Quote Link to comment Share on other sites More sharing options...
Dave Posted February 16, 2020 Share 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 Link to comment Share on other sites More sharing options...
URBANZ Posted February 16, 2020 Author Share Posted February 16, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia 2 Quote Link to comment Share on other sites More sharing options...
Dave Posted February 16, 2020 Share 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 Link to comment Share on other sites More sharing options...
URBANZ Posted February 16, 2020 Author Share Posted February 16, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia 3 Quote Link to comment Share on other sites More sharing options...
Canjucks Posted May 26, 2020 Share Posted May 26, 2020 (edited) Did you end up uploading to GitHub? Edited May 26, 2020 by padre Quote Link to comment Share on other sites More sharing options...
URBANZ Posted May 26, 2020 Author Share Posted May 26, 2020 (edited) Nothing Here Edited September 21, 2020 by urbanmafia 4 Quote Link to comment Share on other sites More sharing options...
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.