pageview holders from different tables

6 posts by 2 authors in: Forums > CMS Builder
Last Post: March 12, 2008   (RSS)

Re: [mawebplus] pageview holders from different tables

By Dave - March 7, 2008

No problem. You can just use two viewers and the owner num from the first table to look it up. The second viewer would be a "page viewer" and should look something like this:

<?php
require_once "YOUR_PATH/lib/viewer_functions.php";
$options = array();
$options['tableName'] = 'owners';
$options['recordNum'] = $record['owner'];
$options['where'] = '';
$owner = getRecord($options);
?>


Note that I renamed "$record" in this second viewer to $owner so it won't conflict with the first viewer. You could display the owner fields like this: <?php echo $owner['name']; ?>

Give that a try and let me know how it goes.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] pageview holders from different tables

By mawebplus - March 7, 2008

i did not work as i expectedfor some reason :(

Re: [mawebplus] pageview holders from different tables

By Dave - March 10, 2008

What error did you get? Or what happened?

If you want to attach your page with the viewer code in it I can take a look if you like.

Let me know.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] pageview holders from different tables

By mawebplus - March 12, 2008

did try as you told me but it did not work, and just because i am on a race against time i changed the approach to one full table. thanks for the help ill get some more questions later. [cool]

Re: [mawebplus] pageview holders from different tables

By Dave - March 12, 2008

No problem, just let me know next time it comes up and I'll help you out.
Dave Edis - Senior Developer
interactivetools.com