EasyCFM.COM ColdFusion Forums / MySQL Related Issues / Database settings

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: Database settings

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

MIGhunter
01-11-2008 @ 1:46 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 570
Joined: Apr 2006

New to MySQL and I looked everywhere.  Most explanations seemed more like installing instructions.  Here are my questions.

I want 3 fields.  

1st field is the primary key set to auto increment.  Do, I set it to "INT"?

2nd field is a date field.  Do I set it to "Date"?  I want to use cf to insert the current date.

3rd field is an Event summary field.  I need it to be able to store links for pictures and be a magazine page long if necessary.  How should I set this field?

Thanks.  If anyone knows any MySQL tutorials, that would be great.

gmilby
01-11-2008 @ 5:36 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 281
Joined: Nov 2007

this tutorial is pretty good - it's command line setup more less, but if you're using a special gui tool - post it - i'll look for instructions for it
(btw, i use tinyint for the ingreenting field, but that's just a preference).

http://www.tizag.com/mysqlTutorial/mysqltables.php

tgif Wink

Success is the ablity to go from one failure to another with no loss of enthusiasm.
-Sir Winston Churchill

gmilby
01-11-2008 @ 5:38 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 281
Joined: Nov 2007

i think i like this site better:
http://sql-info.de/mysql/examples/CREATE-TABLE-examples.html


Success is the ablity to go from one failure to another with no loss of enthusiasm.
-Sir Winston Churchill

MIGhunter
01-11-2008 @ 10:00 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 570
Joined: Apr 2006

I host at fusionlink.com and they use phpMYadmin version 2.8.2.

louissto56
01-17-2008 @ 5:43 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 1149
Joined: Jan 2007

So its the datatypes your worried about?

For starters, are you going to be creating this from an SQL Dump file or a GUI?

You are correct on the first 2 datatypes. For the 3rd, I would just use varchar.

Usually DBMS tend to make the first column the primary key.

____________________________
My Biz List.com.au :: Feb 08

Lossed
02-01-2008 @ 2:46 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 1095
Joined: Apr 2004

It's such a great reference manual that I tend to use it almost every day.

data types

create table syntax

HTH

Lossed
---------------------------
When the only tool you have is a hammer, everything looks like a nail Smile
-----------------------------

This message was edited by Lossed on 2-1-08 @ 2:46 PM


Website Designed and Developed by Pablo Varando.