
Chris
Staff
/ Moderator

Aug 27, 2010, 2:26 PM
Post #2 of 4
(5559 views)
Shortcut
|
|
Re: [moh3] associate special data with each user
[In reply to]
|
Can't Post
|
|
Hi moh3, You can do this using a List Field. Let's say you have a Multi Record section called "Phone Bills", add a List Field to it called "user":
Field Label: User Field Name: user Field Type: list Display As: pulldown List Options: Get options from database (advanced) Section Tablename: accounts Use this field for option values: num Use this field for option labels: username Now you can associate Phone Bills with Accounts. Finally, to show a user their Phone Bills, you'll want to use a 'where' clause to get only the records associated with the CURRENT_USER's num:
list($phone_billsRecords, $phone_billsMetaData) = getRecords(array( 'tableName' => 'phone_bills', 'where' => mysql_escapef('user = ?', $CURRENT_USER['num']), )); Does that help? Please let me know if you have any questions. Chris
|