Christian,
Depends on how you plan to display the result but something like this
would work.
$map:= """
id: [people]id;
first: [people]first;
last: [people]last;
friend_list: buildaListOfFriends
$cb:="""
query([friend];[friend]id=[people]id)"""
The Active4D Method buildaListOfFriends would then basically do a
loop around the friends records found and maybe just string the
friends names together with a <br> in between.
Hope this helps.
Regards, Michael.
On 7 Dec 2005, at 15:52, Christian Cypert wrote:
Looking over the docs this is exactly what I need, but one further
question. How does one display the information if the callback
returns multiple records as would be our case?
Example:
$map:= """
id: [people]id;
first: [people]first;
last: [people]last;
friend_first: [friend]first;
friend_last: [friend]last """
$cb:="""
query([friend];[friend]id=[people]id)"""
Where the [friend] table can return a list of friends not just one.
The table overview would look something like the following:
ID First Last
1 Chris Cypert
Friends:
Person One
Person Two
Person Three
...
2 Next Person
Friends:
Another One
Another Two
Another Three
...
...
On Dec 6, 2005, at 4:39 PM, Michael Kaye wrote:
if you are using v4, can you not use a rowset callback? Create it
with an heredoc string and you can execute multiple lines of code
per rowset row.
Christian Cypert
[EMAIL PROTECTED]
I really didn't foresee the Internet. But then, neither did the
computer industry. Not that that tells us very much, of course -
the computer industry didn't even foresee that the century was
going to end.
- Douglas Adams
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/