ok, so I got the idea I needed something like this:
Field | Type | Null | Default
date | timestamp(14) | Yes | NULL
info | text | No |
(should the info part be text or varchar(255)??)
so.. does that look about right? That pdf wasn't that helpful, really. I got a basic understanding about databases, but that was about it.
drawing news from my site onto a png
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
text has an upper limit of 64K of text.. I'm pretty doubtful you'll go over 100 or more characters.. so using a varchar of some size would work well. Although, it pretty much doesn't hurt at all using text.
as for the date field, I'd suggest using an int, so you can store the unix timestamp with being able to easily format the date into whatever you desire down the road.
as for the date field, I'd suggest using an int, so you can store the unix timestamp with being able to easily format the date into whatever you desire down the road.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
the current unix timestamp is at maximum, int(11)...
as for writing and reading: [php_man]mysql_query[/php_man] has several examples. [mysql_man]select syntax[/mysql_man] for specifics of sql selection with mysql. read the hundreds of threads we have here in the databases section, you'll find lots and lots more examples of fetching (hint) the information found by a query.
as for writing and reading: [php_man]mysql_query[/php_man] has several examples. [mysql_man]select syntax[/mysql_man] for specifics of sql selection with mysql. read the hundreds of threads we have here in the databases section, you'll find lots and lots more examples of fetching (hint) the information found by a query.