Jump to content

[SOLVED] New Script I'm writing


Greaser9780

Recommended Posts

I want to create a script in php so that when someone registers a new clan it will automatically create a page where they can see there stats and update their clan information.I have no clue what to use in order to create a new file. Even if I could, how would the new file be stored? In my file manager or db?

I appreciate any feedback.

Link to comment
Share on other sites

I recommend picking up a book on MySQL that goes more in depth on table design, MySQL features, etc. than a book that talks about MySQL and PHP.  The very first database driven website I wrote didn't have a single table join in it because I didn't even know they existed, which I still get a good laugh out of.  There's also a lot of common tasks you'll try and accomplish in PHP code that you can do more easily in MySQL; in other words, the amount of "programming" code you can move into database logic is astonishing and something every programmer should be aware of.

 

The only reason I say this is because of this statement:

"Since clans will have multiple members use the leaders id that registered it?"

 

We all need to start somewhere, but a good book should help answer 95% of the initial questions such as those.

 

However, if you don't want to buy a book, I suggest something like the following:

 

table {field1, field2, field3, ...}

users {id, login, password, ...}

clans {id, name, ...}

clan_member_ranks {id, name, ...}

clan_members {clan_id, member_id, rank_id, ...}

Link to comment
Share on other sites

Well I started developing a gaming site since I am or was very into games a couple months ago. Recently I found myself enjoying the site design and php/mysql more so than the games.Site will probably just be used for gaining experience with coding and what not.

    Currently I only have 2 tables set up in my db. 1 is for users as they register into my site and the 2nd is a table I sat up for my first game ladder which holds things such as wins,losses,clan name, id, last battle, player names and so on.

    Seeing as how I am getting more in depth, rather than just creating a few simple scrips I believe it is time for me to pick up a book or three.

 

TY for the insight.

Link to comment
Share on other sites

I've read many, many programming books; I literally have shelves full of them.

 

I've found the "Teach Yourself XYZ in " 21 days, 24 hours, 14 hour type books are actually full of good information and a good way to get off the ground quickly.

 

If you're looking for a little more detail, I find the O'Reilly published books are a very good resource.

 

After that google and these types of message boards are the best bet.

 

I'd go down to your local, large book retailer and look at all of the available PHP books to start with.  Pick up a couple, read some of each of them, and buy the one that's written in a way you can understand.  Books are expensive so buy one at a time IMO.

 

When you get most of the way through the first one, go back and look at books dedicated to MySQL.  Not just a book that talks about using MySQL and PHP together, but one that will go into detail about the different features of MySQL itself.  What types of common tasks you can accomplish with simple database queries, why choosing a good data type for a column is important, how to analyze your queries, make better indeces, etc.

 

The most efficient PHP website will drop to its knees if the foundation is a poorly designed database.  It's nice that a lot of free information is available on the web, but I still feel the best resource is a good book.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.