1 Replies - 4450 Views - Last Post: 23 January 2005 - 10:18 AM Rate Topic: -----

#1 SoLi  Icon User is offline

  • andydust.com

Reputation: 41
  • View blog
  • Posts: 1,438
  • Joined: 27-January 02

Mysql Field Array

Posted 23 January 2005 - 10:05 AM

what is the best way to store an array of data within one mysql field so that php can later pick through the values.

for example say i had one table called User, and another table called Essays. and the point of the system was to allow user's to review the essays, but they can only review each essay once. so i make a field on the user table called reviewedessays, and the field stores all the IDs of the essays the user has reviewed, i.e. 4 | 5 | 14 | etc all within one field and obviously this grows over time.

is their a special preserved way of doing this, or do i simply separate each value with a symbol and then just tell php to treat each value between those symbols separatly?

thanks, SoLi.

Is This A Good Question/Topic? 0
  • +

Replies To: Mysql Field Array

#2 SoLi  Icon User is offline

  • andydust.com

Reputation: 41
  • View blog
  • Posts: 1,438
  • Joined: 27-January 02

Re: Mysql Field Array

Posted 23 January 2005 - 10:18 AM

okay someone just pointed out to me i could just create another table with 2 fields that show which users have voted for what.

lol, it seems im forgetting the fundamentals of relationship databases :S

Thanks anyway.

This post has been edited by SoLi: 23 January 2005 - 10:18 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1