Jump to content
MakeWebGames

Recommended Posts

Posted

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?

Posted
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.

Posted
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());
Posted

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.

Posted
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 ...

Posted
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?

Posted

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.

Posted

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 :)

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...