By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,949 Members | 889 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,949 IT Pros & Developers. It's quick & easy.

Can someone please create some MySQL to create the first table: the players table.

P: n/a
This is not for a class, I have a group on SourceForge, this is what
one of the Developers is asking; the more advanced you can make it
right off all the better!:
Can someone please create some MySQL to create the first table: the
players table.

It will need to include (as a minimum):
- ID (unique)
- Name
- Health / HP
- LastSeen (integer or date?)

Perhaps it's a good idea to keep things minimal for now. I'd just like
to see how fast something like this small task will get done :)
Please email me at mlauzon (AT) gmail DOT com
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Michael Lauzon wrote:
This is not for a class, I have a group on SourceForge, this is what
one of the Developers is asking; the more advanced you can make it
right off all the better!:
You mean this project?
http://sourceforge.net/projects/lamyle/
Can someone please create some MySQL to create the first table: the
players table.

It will need to include (as a minimum):
- ID (unique)
- Name
- Health / HP
- LastSeen (integer or date?)


create table player(
id int unsigned primary key auto_increment,
name varchar(255),
health int,
last_seen datetime
);

But are you seriously doing a php+mysql game, without any knowledge in sql?
Jul 20 '05 #2

P: n/a
Aggro <sp**********@yahoo.com> wrote in message news:<QR************@read3.inet.fi>...
Michael Lauzon wrote:
This is not for a class, I have a group on SourceForge, this is what
one of the Developers is asking; the more advanced you can make it
right off all the better!:
You mean this project?
http://sourceforge.net/projects/lamyle/


How did you know that?


But are you seriously doing a php+mysql game, without any knowledge in sql?


Yes, I've posted on numerous places looking for MySQL Developers.

I am better at leading, because I cannot program.
Jul 20 '05 #3

P: n/a
Michael Lauzon wrote:
How did you know that?
I searched people from sourceforge with the name Michael Lauzon, which
you are using here in the newsgroups. I found two persons with that name
and there was only one project which looked like a game.

I didn't mean to spy on you, but if I'm helping someone, I will check
their story before doing so ;)
Yes, I've posted on numerous places looking for MySQL Developers.
The project seemed to have something like 10 developers. Doesn't anyone
of them know SQL? Or are the developers in idle-state?

You can actually design and implement a large project with only 1
database programmer. You do it so that you have one or many
database-related php files where you do all the queries and then you
just return the results as arrays and take the required search
parameters as arrays also. This is also recommended, logical and clean
way to do it.

But if you are looking for developers, why did you ask for SQL-code? It
is no use for you unless you also know how to insert data, how to run
queries, how to update and delete data.
I am better at leading, because I cannot program.


I hope I don't sound mean, but from my experience, if you don't know how
to program, you won't be very good leading programmers. People who can't
program can however write specifications for the project. In that they
are usually pretty good, but again not as good as programmers.

Let's use you as an example. From your first post:

"Perhaps it's a good idea to keep things minimal for now. I'd just like
to see how fast something like this small task will get done"

This is wrong approach. If you design a database, you should try to have
all required things there at the very beginning. The more you have to
modify it later, the more job you will need to do in total, and the more
complex the database will propably get. Also, if you have the database
design ready, you can design the database-related functions. And when
you have the functions designed, the coders can start working on the
applications.

So if you are able, try to design all required tables and all required
columns for those tables. Also try to deside what type the columns
should be.

For example if you they are text, should they have 10 characters, 255
characters or unlimited amount of characters. If you are using numbers,
deside should numbers be always >= 0 or do you need negative numbers
also. (For example I set the health to be int, assuming that player can
be also dead, when health could be -1 to indicate this).

And if using numbers, what range of numbers should be used? 32-bit
unsigned integer can only be a number between 0 - 4294967295, so if you
need for example larger amounts of health to be saved, you will need to
use 64-bit integers, or save the health in two columns, or save it as
text (which doesn't sound like a smart idea except in some special cases).

If you have somekind of database design, there are all the table names,
columns with names and types. Creating the database is very trivial task
and takes only something like 10 minutes (assuming the types are already
in format the database understands). Even if the format is something
like (text, 20 characters / number between 10 to 20), it won't take very
long to create the database from that.

But the catch is.. If you are not experienced database designer, you
will propably do a poor design. I had lately a database design at work,
made by non-programmers. There was originally 2 tables. Now there is
something like 12 tables. Also some columns in original table has bee
transferred into different table, some columns are added into original
tables etc.

But the poor design is usually a good start. It gives the experieced
programmer a good start and idea what information the system should
hold. So doing the "bad design" is a lot better idea rather than not
doing it.
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.