Sean Larson
Dec 8 2007, 02:37 AM
I need to make a new table with 4 fields, 2 of them being integers 2 of them being strings, how would i go about doing this please be detailed because im a noob when it comes to mysql
Brian Chandler
Dec 8 2007, 07:37 AM
"...detailed..."?? Do you mean you want someone to do it for you?
Have you read an introduction/tutorial to MySQL? Do you know about creating a table with, for example one field? Making four fields is the same, only you need to look at the Quick Reference to remember the syntax. I found a good QR at
http://www.deepx.comso I suggest you get one and print it out. Then when you have a specific question, please ask again.
Sean Larson
Dec 8 2007, 02:08 PM
I have been reading stuff on it and I do have a specific question kinda but i wasnt sure if i was doing it completely wrong so i thought i would just ask from the beginning lol, I dont know how to put a field as a string or an integer, I believe integer is INT but i dont know for sure
Brian Chandler
Dec 8 2007, 02:40 PM
Well, start by getting some reference material. Download and print the Quick Reference I suggested. Find the MySQL online manual (sadly, horrible compared with the php manual), google for some tutorials.
You can just log on to the db server manually, and practice commands. Since (presumably) you don't yet have any data you could corrupt, just splash away, and you will learn, much faster than if someone else has to write your code for you.
Sean Larson
Dec 8 2007, 04:56 PM
I have alot of data i could corrupt in mysql, i had someone who did it for me, but then she got cancer and is doing chemo so she cant finish it, but i am only 1 table away and 4 fields from being finished lol
Brian Chandler
Dec 9 2007, 07:39 AM
OK, so you already have a lot of stuff in a database? And lots of programs (written in PHP? Perl? xyz?) that access it? Have you looked at them? "Just add one table" is not like "Just add salt to taste" - you will have to make the stuff you add work together with the existing stuff, which you will need to understand, at least in outline.
First thing is to make a backup of the database, then try what I said before. Find out how to check the details of the existing tables (this should be in Chapter 1 of any tutorial). See how existing tables are defined - it's likely that you already have at least one integer field and one text field already.
Sorry, but if you are hoping someone is just going to write "the instructions for adding one table", it isn't going to happen. Not just because it's not the way for you to learn anything, but because it's also impossible without looking at all the existing tables, and seeing how the fields in your new table relate to the existing one.
Please give the URL of the tutorial material you are looking at. Have you downloaded a QR yet?
Sean Larson
Dec 9 2007, 05:25 PM
I only need to know how in gods name do i put a field as a string, i have a guide to what i am doing with my database in mysql, but it says put 2 fields as a string, and put 2 as integers.... i cant figure out how to make it a string
Brian Chandler
Dec 9 2007, 11:02 PM
Try TEXT
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.