pageview holders from different tables
6 posts by 2 authors in: Forums > CMS Builder
Last Post: March 12, 2008 (RSS)
By mawebplus - March 7, 2008
table 1 cms_vehicles : on this one there is a field named owner wich i get from the other table
table 2 cms_owners : on this one i have the owners info
i need a page viewer thatgives me the info from first table andextracts the info from the second table too, depending on the owner field.
thnx for any pointers i am stock here. i am not a php programmer and i am doing my best
Re: [mawebplus] pageview holders from different tables
By Dave - March 7, 2008
<?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.
interactivetools.com
Re: [Dave] pageview holders from different tables
By mawebplus - March 7, 2008
Re: [mawebplus] pageview holders from different tables
By Dave - March 10, 2008
If you want to attach your page with the viewer code in it I can take a look if you like.
Let me know.
interactivetools.com
Re: [Dave] pageview holders from different tables
By mawebplus - March 12, 2008
Re: [mawebplus] pageview holders from different tables
By Dave - March 12, 2008
interactivetools.com