icsulescu Posted August 8, 2010 Posted August 8, 2010 I'm talking about the mysql connection. I saw that mccodes has a variable ($c) in wich are stored the connection details. But you have to introduce this variable after every mysql query. Other solution is making a connect.php file who connects to tha database and include it in every file. Wich is better for the site loading speed? What about security? Quote
Dave Posted August 8, 2010 Posted August 8, 2010 I'm talking about the mysql connection. I saw that mccodes has a variable ($c) in wich are stored the connection details. But you have to introduce this variable after every mysql query. Other solution is making a connect.php file who connects to tha database and include it in every file. Wich is better for the site loading speed? What about security? You could off course create your own script? Or use an open source project which actually works a bit better? But there won't be a significant difference in the two methods you've suggested... It wouldn't be noticeable enough to be a concern. Quote
icsulescu Posted August 8, 2010 Author Posted August 8, 2010 Hmm, what mcc version are you using?mccodes lite. Here's a code example: $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); Quote
icsulescu Posted August 8, 2010 Author Posted August 8, 2010 You could off course create your own script? Or use an open source project which actually works a bit better? I'm not that good on the security part. Can you tell my about a good game script ... But there won't be a significant difference in the two methods you've suggested... It wouldn't be noticeable enough to be a concern. Ok. Thanks for your help. Quote
NarutoPRG.com Posted August 8, 2010 Posted August 8, 2010 Right now, if you want a secured and clean script. Go for Horizons. I am looking forward to see what V3 is like, so keep that as an option. Quote
icsulescu Posted August 8, 2010 Author Posted August 8, 2010 Right now, if you want a secured and clean script. Go for Horizons. I am looking forward to see what V3 is like, so keep that as an option. I want something free. I don't have a paypal or something like this to pay. P.S.: I don't expect something complex: just a login, register, logout and a few other mods if posible. I just want to be secured ... Quote
icsulescu Posted August 8, 2010 Author Posted August 8, 2010 Try ezRPG, Zap, or flamespark. I tried ezRPG. It's great, but I had a big bug and I didn't knew how to fix it. ... link ... Zap ... I'l try this. flamespark ... can you give me please a link? Quote
icsulescu Posted August 8, 2010 Author Posted August 8, 2010 I think Zap Engine rocks :D. I'll test this script tonight ... Quote
NarutoPRG.com Posted August 8, 2010 Posted August 8, 2010 ezRPG is brilliant. Zeggy developed it like it was a paid script(but with less files :P ). If you had a bug, you could of posted on MWG(sorry if you did and no-one replied). Or mail Zeggy asking for help. :) Quote
Danny696 Posted August 8, 2010 Posted August 8, 2010 If you want me too, i can send you the FS script? Quote
Djkanna Posted August 9, 2010 Posted August 9, 2010 Like David said not considerable difference for the users of your game, however using one over the other may cut down your development time. EzRPG, good engine and starting block. The same for ZapEngine, however at this time I think EzRPG would be best to go with as it is more complete sort to speak than ZapEngine currently is. Quote
Dominion Posted August 9, 2010 Posted August 9, 2010 in a mysql_query you do not need the $c The MySQL connection. If the link identifier is not specified, the last link opened by mysql_connect() is assumed since mccodes lite only has one database you could drop it (i still use it since its good practice and its there if i ever add a new database) as for using mysql_connect on every page you are your just using it via the "include" of mysql.php if your going to use mccodes lite as i am i would suggest you look into getting a class file and doing it that way. class files are so much easier if you want to change a function on every page (course you could also just use functions that are added to global_func.php but thats not the same >< ) if you do pick to use a class file A simple, fast database class for PHP 4+ and MySQL is nice and the post has examples on how to use it in case your new :) Quote
Haunted Dawg Posted August 9, 2010 Posted August 9, 2010 That $c is only there as a resource identifier, but since mccode's does not kill any open query's, this is not needed. Also, the $resourceIdentifier is there as it help's people who use more than 1 database on 1 page. 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.