Gossamer Forum
Home : Products : DBMan : Customization :

New Twist on User Record Limit and more

Quote Reply
New Twist on User Record Limit and more
I have a few questions... I am trying to create a weight loss database whereby each member may keep track of his or her weight on a weekly basis and then graph the results over time. I've put off this project for a long time due to my inability to find a suitable graphing script. I've found one now, but need help exporting the data to it, plus a couple other things also.

1. Is there a way to limit users to one record per week? (Just when you thought there were no other permutations, too!) If not, this isn't essential. It'd be nice, though.

2. Is there a way to pull the data from one field of the last record to another field in the current record? I want to pull the "weight" field from the last record to this record's "LastWeight". Carol, you helped me last year do something similar through sub get_defaults in db.cgi but in that case it was always pulling from "yesterday's" record so I'm not quite sure how to pull it in this case.

3. Then, finally, the thing that should hopefully pull this all together... the graphing script (in PHP) I found requires two arrays to create the graph. The format is $names = array(1, 2, 3, 4, 5) and so forth, and $values = array(1, 2, 3, 4, 5) and so on. What do I need to do to get the results of a search and place all instances of "Week" in the $names array and all instances of "Weight" in the $values array that can be processed through a hidden field on a form?

(The database is set up so that each user may only view, modify, delete, etc his or her own records, so the search will only return that user's records. Also, the ID is the username plus the date [i.e., guest03-Jul-2000] which was set up in a previous journal to prevent more than one entry per day...I thought it would work well in this database as well. )

hmmm...think I've covered everything. Just hope it makes sense. Thanks!


Melanie
http://www.somemoorecats.com/
http://www.okhima.org/
Subject Author Views Date
Thread New Twist on User Record Limit and more msmoore 2088 Jul 3, 2000, 7:11 PM
Thread Re: New Twist on User Record Limit and more
JPDeni 2054 Jul 4, 2000, 2:01 AM
Thread Re: New Twist on User Record Limit and more
msmoore 2032 Jul 4, 2000, 12:07 PM
Thread Re: New Twist on User Record Limit and more
JPDeni 2049 Jul 5, 2000, 10:57 AM
Thread Re: New Twist on User Record Limit and more
msmoore 2020 Jul 5, 2000, 4:09 PM
Thread Re: New Twist on User Record Limit and more
JPDeni 2048 Jul 6, 2000, 2:36 AM
Thread Re: New Twist on User Record Limit and more
vampy 2022 Jul 6, 2000, 6:49 AM
Post Re: New Twist on User Record Limit and more
msmoore 2118 Jul 6, 2000, 6:50 PM
Post Re: New Twist on User Record Limit and more
msmoore 2125 Jul 6, 2000, 6:47 PM