Would it be better to search the database one time, and save all the information into sessions (when a user logs in), or just search the database everytime, and use something like [B]$row[‘column_name’][/B] after you fetch the array.
@NogDogNov 04.2006 — #I'd probably go with the session option, but reserve the right to change my mind depending on what the actual specifics are of your situation.
@The_Little_GuyauthorNov 04.2006 — #Here is what I have in mind... When the user signs in, it takes them to their "Main page" where they get all the user options. They can choose to upload images 20-50 I haven't decided, these will be displayed in their portfolio, which they can edit using HTML, and CSS to make their own design.
What would be stored in the sessions:
- an array of image file names
- an array of other file names (I don't know if I'll need this or not but just in case)
- user name
- user password
- logged in or out
- user id number (auto increment in D?
- first name
- last name (maybe)
The reason I ask this question is for storing the image file names in sessions I was thinking that this way would be faster than searching the DB everytime the user views his/her images, but instead search the DB once for the images. if the user uploads new images, it would add them to the session array, and if they delete image, it would remove them from the session array.