Hi, new to the list.
I'm trying to write a MySQL backend for my website to archive/search news stories, and
other things I have on my site, http://slardy.yi.org/nu-vision/ . I know that my site
is pretty small and I could probably go with using something else but I want to learn
the basics of MySQL, I've been fooling around with it allot lately and I want to start
integrating it with my site while it is young. What I've done so far is basically
plan out how many tables I will need, etc. I plan on using one database file with 6
tables, each table will either be for user data or page content, I have different
types of sections so I need different tables for each. I'm going to write the
front-end software in Perl, which I already have experience with and hope to one day
re-write the site using PHP but still retain the database data, I see no problem with
this. I have two things I need help with.
1) I want to keep a time/date for each piece of news, I know MySQL has a few time and
date types. Would it be easier to use the timestamp type and then convert it to a
human readable time/date in Perl or keep separate time and date variables for each
row. Is the timestamp type like the usual format, seconds since 1970?
2) When I attempt to create the table for news I really hit a brick wall. This is
what I am attempting to use:
create table news (
poster varchar(50) not null,
email varchar(100) not null,
topic varchar(200) not null,
story text(1000) not null primary key);
I get an error on the line "story text(1000) not null primary key);" what would be the
proper syntax? Also by defining story as a larger size would that use more space up
on the hard drive or does that just increase the possible number or characters in the
story, not set aside that many bytes.
Thanks very much. If anyone could suggest a good website for this kind of thing,
other than the MySQL homepage, or even a good book. Thanks very much.
Travis Gant
-----------------------------------
[EMAIL PROTECTED]
http://slardy.yi.org/nu-vision/