Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
mithras said:
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. :P

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
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
);


Mithras

Mithras Avatar

****
Studio Member

600


July 2006
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!

lucifer said:
"Behold: me! I have authority in this building."

Mithras

Mithras Avatar

****
Studio Member

600


July 2006
Ehh... I edited the last post, so I don't think that this is coming up as new.... so...

bump


Support Rob Scuderi, the #1 Penguins Defender!

lucifer said:
"Behold: me! I have authority in this building."

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
If you have phpMyAdmin, they should have a built in section for creating a table. :)

Mithras

Mithras Avatar

****
Studio Member

600


July 2006
Really... I'll have to look into that. Thanks

Edit: Um... where do I find that?


Last Edit: Oct 11, 2006 0:57:30 GMT by Mithras


Support Rob Scuderi, the #1 Penguins Defender!

lucifer said:
"Behold: me! I have authority in this building."

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
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. :P)

Mithras

Mithras Avatar

****
Studio Member

600


July 2006
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 :P


Last Edit: Oct 11, 2006 21:37:44 GMT by Mithras


Support Rob Scuderi, the #1 Penguins Defender!

lucifer said:
"Behold: me! I have authority in this building."

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Can you show me what you mean?

Mithras

Mithras Avatar

****
Studio Member

600


July 2006



Last Edit: Oct 12, 2006 1:11:53 GMT by Mithras


Support Rob Scuderi, the #1 Penguins Defender!

lucifer said:
"Behold: me! I have authority in this building."

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
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. :P)

Mithras

Mithras Avatar

****
Studio Member

600


July 2006
Well, I created the table (finally :P), 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:

#1054 - Unknown column '1' in 'field list'


God I feel stupid... :-/


Support Rob Scuderi, the #1 Penguins Defender!

lucifer said:
"Behold: me! I have authority in this building."

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
"INSERT INTO blogdb ('entry','name','date','content','comments') VALUES ('1','John','".date()."','Hi','0')"



Try that.

Mithras

Mithras Avatar

****
Studio Member

600


July 2006
I hate phpMyAdmin:

#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '"INSERT INTO blogdb ('entry','name','date','content','comments'



Support Rob Scuderi, the #1 Penguins Defender!

lucifer said:
"Behold: me! I have authority in this building."

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
USe their built in insert and it should give you the code. Find the difference so you can correct your's. =/

newBookmarkLockedFalling