|
Sorry to bump this, but I just started trying to do this again, and I have one serious question... How do I create the database? Do I just go into my Admin Panel on the server, and physically create it, or do I use some fancy code? I'd use phpMyAdmin or cPanel to create it if those are an option, otherwise, you'll have to use the "fancy" code.
|
|
|
|
|
using phpmyadmin is alot easier to create databases but it depends on your server setup.. if you use cPanel then your access to phpmyadmin will be limited and you will have to use that to create a database..
otherwise
CREATE DATABASE `name`;
nothing too fancy about that eh? unless your on about creating tables which you will have to do in phpmyadmin or using this code in php with your connection values
CREATE TABLE `tablename` ( `id` BIGINT(20) TEXT NOT NULL );
|
|
|
|
|
I have a server with 1and1, and they have this admin panel that pwns all others. I'll go make it there. I just wanted to make sure that it was the same thing. Edit: Ok, I was trying to run a query on phpMyAdmin to create a table, but it kept giving me an error. I think it was with how I was setting up my column for the date/time. When I specify the type of data to go into the column, do I keep the parenthases empty, or actually put in the letters?
Last Edit: Oct 10, 2006 23:36:24 GMT by Mithras
|
Support Rob Scuderi, the #1 Penguins Defender!
"Behold: me! I have authority in this building."
|
|
|
|
|
If you have phpMyAdmin, they should have a built in section for creating a table.
|
|
|
|
|
|
From the main page, either select the database you want or create a new one. Now load that database's page using the menu on the left. In the right frame, near the bottom, should be a table saying "Create new table on database iyccv1:" (where iyccv1 is the DB name). =/ IF you don't see that, screenshot what you have and post it here. (And obviously blank out any personal information. )
|
|
|
|
|
Ahh... there we go. Idiots made the links to the databases the same color as the text, so I didn't even know that it was a link. Thanks for the help. By the way, what would I put in the little box next to the date object? I'm getting an error, and I think they want parameters
Last Edit: Oct 11, 2006 21:37:44 GMT by Mithras
|
Support Rob Scuderi, the #1 Penguins Defender!
"Behold: me! I have authority in this building."
|
|
|
|
Can you show me what you mean?
|
|
|
|
|
|
That's how long the entered value's can be. Check the tutorials board, there's a tutorial on MySQL column types. That'll help you figure out if you want varchar or not (because, most likely you don't. )
|
|
|
|
|
Well, I created the table (finally ), and now I'm trying to run a query to add stuff. Here's what I'm putting in: INSERT INTO `blogdb` (`entry`,`name`,`date`,`content`,`comments`) VALUES (`1`,`John`,`date()`,`Hi`,`0`)
What I got: God I feel stupid...
|
Support Rob Scuderi, the #1 Penguins Defender!
"Behold: me! I have authority in this building."
|
|
|
|
"INSERT INTO blogdb ('entry','name','date','content','comments') VALUES ('1','John','".date()."','Hi','0')"
Try that.
|
|
|
|
|
|
USe their built in insert and it should give you the code. Find the difference so you can correct your's. =/
|
|
|
|