Jump to content
MakeWebGames

HOW DO I SORT OUT THE DATABASE!!!


webster2001

Recommended Posts

Re: HOW DO I SORT OUT THE DATABASE!!!

Now that I can connect to the site, the problem appears to be that you're missing the line of code that selects the database to connect to.

 

<?php

$con = mysql_connect(HOST, USER, PASS);
mysql_select_db(DB);

?>

 

That's what my connection script looks like. Of course that's included on every page that needs a db connection.

Note the use of constants. Each of those could just as easily be something like

$con = mysql_connect('localhost', 'db_user_name', 'db_user_pass');

mysql_select_db('my_db_name');

Link to comment
Share on other sites

Re: HOW DO I SORT OUT THE DATABASE!!!

Ok, the codes you are using are V1.1 and so here is what you do.

Go to mysql.php

And do this:

<?

$c=mysql_connect('localhost','CPANEL USERNAME HERE','CPANEL PASSWORD HERE') or die(mysql_error());
mysql_select_db('FULL DATABASE NAME HERE',$c);

?>

 

If not, you will have to go onto your cPanel and click on:

'MySQL Databases' and you will know what to do then.

 

I know this is a complicated situation for new coders, if you need help please message me.

Thanks

Toxication :-D

Link to comment
Share on other sites

Re: HOW DO I SORT OUT THE DATABASE!!!

I should have noted that this line here:

mysql_select_db('my_db_name');

is the line of code that was missing or in error.

Sorry if that omission caused any confusion.

To add to the point about going into cpanel. If you don't know your database name, go into cpanel as was mentioned, and once you're looking at the mysql database stuff, you'll see the databases (schemas) that you have.

There could be more than one schema there, so you'll have to figure out which is the right one.

If one of them is called information_schema, it's definitely not the one you want.

Link to comment
Share on other sites

Re: HOW DO I SORT OUT THE DATABASE!!!

I'm not sure if you're looking to make money on this game, or if you're just doing this as a hobby, akin to twiddling your thumbs.

If you're looking to make money at this, and at the risk of sounding like an ass, perhaps I can save you some frustration man.

It sounds like you barely know anything about coding. I'm guessing you know how to run an installer and ran into a problem and couldn't solve it. So, that means you prolly don't know php or mysql. I have no idea what kind of skills you have in administering a web site or a web server, so I won't make a guess on that, but I'll assume you have at least a rudimentary set of skills in those two areas (as without them, since you don't have php or mysql you're basically doing something you know absolutely nothing about.).

Okay, so now I sound like an ass, but if I'm right and you are in the situation I think you are, lemme tell you what's prolly going to happen:

1. Getting people to join your game is going to be a hassle because you prolly don't have the skills to really make it good. Anyone can edit HTML, but can you make a php script? When people login to your game and see the same old tired things that are in place everywhere else, they'll move on leaving you to wonder why the people that sign up don't ever really stay.

2. Some folks will take advantage of "KNOWN" bugs in mc code and ruin the economy in your game over and over again. Since you prolly don't have the skills to fix these bugs, and due to #1 you likely won't have the player base to be able to afford to fix these problems using money earned from running the game.

 

All of this can be overcome by putting out some good money and hiring the folks that can make it happen for you. I'm guessing you're not in that position.

Or you can learn php and mysql, and in that case, take a year, seriously, maybe even more, and learn them well. Then get your game going.

Anyways, now that I'm sure I've thoroughly taken your opinion of me and flushed it, I say this cuz you're prolly spending a few bucks on web hosting, and you might even buy a mod or two. SAVE YOUR MONEY lol

Stick with a free host, twiddle your thumbs on some php and mysql for a year, and then come out with your game. You'll thank me in the end for saving you the frustration of being one of the many that had high hopes and struggled on striving to make it work, when it was doomed in the first place.

:mrgreen:

Link to comment
Share on other sites

Re: HOW DO I SORT OUT THE DATABASE!!!

 

Please wirte back here. My game is www.criminalnation.x10hosting.com/login.php

Login with username: admin

password: admin

Please tell me what i have done wrong. it is mccodes v1.1

The thing you have done wrong is getting mccodes v1.1 lol

Also make daily back ups if you are going to try and make a game with x10hosting

browse through this forum and look for a free host what allows you to run a game on their servers.

Link to comment
Share on other sites

Guest Anonymous

Re: HOW DO I SORT OUT THE DATABASE!!!

 

I'm not sure if you're looking to make money on this game, or if you're just doing this as a hobby, akin to twiddling your thumbs.

If you're looking to make money at this, and at the risk of sounding like an ass, perhaps I can save you some frustration man.

It sounds like you barely know anything about coding. I'm guessing you know how to run an installer and ran into a problem and couldn't solve it. So, that means you prolly don't know php or mysql. I have no idea what kind of skills you have in administering a web site or a web server, so I won't make a guess on that, but I'll assume you have at least a rudimentary set of skills in those two areas (as without them, since you don't have php or mysql you're basically doing something you know absolutely nothing about.).

Okay, so now I sound like an ass, but if I'm right and you are in the situation I think you are, lemme tell you what's prolly going to happen:

1. Getting people to join your game is going to be a hassle because you prolly don't have the skills to really make it good. Anyone can edit HTML, but can you make a php script? When people login to your game and see the same old tired things that are in place everywhere else, they'll move on leaving you to wonder why the people that sign up don't ever really stay.

2. Some folks will take advantage of "KNOWN" bugs in mc code and ruin the economy in your game over and over again. Since you prolly don't have the skills to fix these bugs, and due to #1 you likely won't have the player base to be able to afford to fix these problems using money earned from running the game.

 

All of this can be overcome by putting out some good money and hiring the folks that can make it happen for you. I'm guessing you're not in that position.

Or you can learn php and mysql, and in that case, take a year, seriously, maybe even more, and learn them well. Then get your game going.

Anyways, now that I'm sure I've thoroughly taken your opinion of me and flushed it, I say this cuz you're prolly spending a few bucks on web hosting, and you might even buy a mod or two. SAVE YOUR MONEY lol

Stick with a free host, twiddle your thumbs on some php and mysql for a year, and then come out with your game. You'll thank me in the end for saving you the frustration of being one of the many that had high hopes and struggled on striving to make it work, when it was doomed in the first place.

:mrgreen:

 

I think I love you...unfortunetely no matter how many times this is said, no matter how bluntly or eloquently put...they NEVER listen. They ALWAYS think they can toss some free game engine up on a cheap ass server and make money for nothing. They all think they will get rich quick at the expense of the poor people who try to play these halfassed games. These games if lucky on a good day have a shelf life of about one month...

 

Seriously webster2001 take Floydian's advice to heart ...either have a bankroll to pay people to work on your game or learn to do it yourself...as a potential gameowner you OWE it to your potential clients...

Link to comment
Share on other sites

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