|
Posted by Rik on 05/11/06 11:59
guitarromantic@gmail.com wrote:
> Oops, just occured to me that I can't store a comma in an int field..
> changed to varchar, worked a charm, thanks!
>
> Do you think this approach is still viable for my site, though? If
> there's a more efficient/professional way, I'm interested.
An extra table would help to make the data more accessable.
TABLE reviews
review_id
some_other_fields
TABLE staff
staff_id
some_other_fields
TABLE staff_reviews
review_id
staff_id
That way cou can also keep the id's all integers, which would be a lot
faster then searching a varchar for a number that may or may nog be between
comma's.
To keep integrity intact I'd advice using InnoDB tables:
http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.html
Unless there is a lot of adding and deleting, then using InnoDB might slow
it down.
Grtz,
--
Rik Wasmus
[Back to original message]
|