Forum Moderators: coopster

Message Too Old, No Replies

Database types for random affiliate

         

lajkonik86

10:01 am on Apr 11, 2005 (gmt 0)

10+ Year Member



Heey

I need a bit of help with the database part of doing a random affiliate thing

i would like the database to contain 6 fields.
importance (higher number gives more displays)
image location
link
name
description
movement (wether their button is animated)

Problem is my knowledge of database fields. It's a bit low and i make mistakes.
What types should i use for optimal database performance?

Thanking you in advance,
Thierry

coopster

6:33 pm on Apr 11, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



It depends on what values and how large of values you are going to store in the columns. For example, what is the largest possible "importance" value that can be assigned? You need to define those attributes before you can determine the column type.

HughMungus

6:46 pm on Apr 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm no expert, but I've set this up on my site and this is how I'd do it:

importance: integer (range from 1 to 5)
image location: integer (use numbers to designate zones on the page)
link: varchr
name: varchr
description: text
movement: enum ('y','n')

lajkonik86

8:29 pm on Apr 11, 2005 (gmt 0)

10+ Year Member



hey i'm wondering how you display random affiliates using that system?