Re: Storing array in a row
- From: "Rik" <luiheidsgoeroe@xxxxxxxxxxx>
- Date: Thu, 11 May 2006 10:59:06 +0200
guitarromantic@xxxxxxxxx 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
.
- Follow-Ups:
- Re: Storing array in a row
- From: guitarromantic
- Re: Storing array in a row
- References:
- Storing array in a row
- From: guitarromantic
- Re: Storing array in a row
- From: Rik
- Re: Storing array in a row
- From: guitarromantic
- Re: Storing array in a row
- From: guitarromantic
- Storing array in a row
- Prev by Date: Re: Program design help
- Next by Date: Re: Hosting and testing a php site [OT]
- Previous by thread: Re: Storing array in a row
- Next by thread: Re: Storing array in a row
- Index(es):