Dear all,
I'm new in php MySQL and I'm wondering on how to maka users add many informations in one table, I'll explain. Now I have a table called users conataining: Username(primary key) - Name - Birthdate - Country and
I want the user can add infos in a table like this:

Date -----------------Note ------------Annother thing
28/11/2008 --------Something --------12
12/03/2009 --------fdsfsdf ------------2121

Did you understand? I mean that he adds manually theses details in a form, how does MySQL store that, Do I need new tables and join them, if yes how?

Sorry for bad english
Thank you very much!

8 Years
Discussion Span
Last Post by phpbeginners

Hi Vortex,

Don't worry, your english is fine.
Let me help you out on your understanding of mysql. Let me first though, layout the terms:

mysql - it's what you command sql with
sql - is basically a big table on a server

Yes, you heard me right, sql is basically a big table, except on a server. So say you have a table called "comments"; and you want to submit some data into it, like a comment and the date of the comment.
First, the commands:

INSERT INTO comments (text, date) VALUES ('this is the text','Jun 15')
INSERT INTO comments (text, date) VALUES ('some more text','Jun 17')

then, the table would look like this:
____this is the text ____|______Jun 15_______|
____some more text ___|______Jun 17_______|

Hopefully that helps you out a bit. I would recommend you do a google search for some mysql tutorials. It would help a lot.

Have a good day, and ask if you need any more help.



every user there is a name and bday that is fine but in country you should have separate table for country because not all user have only one country you have to give them the options to select their country right?

you should have countryid <pk> (primary key) and <fk> (foreign key) in your users table.

when the id from users table matches to country id that is considered his country.

in database you should learn how the database relationship works:

1. one to one
2. one to many
3. many to many

you can google search the said topics.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.