I have the following bits of code:
PHP Code:
$referrers_query = "select c.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address, " . "c.customers_telephone, a.entry_street_address, a.entry_city, a.entry_state, a.entry_country_id, " . "n.countries_name, a.entry_zone_id, a.entry_postcode, r.referrer_customers_id, r.referrer_key, r.referrer_homepage, " . "r.referrer_approved, r.referrer_banned, r.referrer_commission from " . TABLE_CUSTOMERS . " as c, " . TABLE_ADDRESS_BOOK . " as a, " . TABLE_REFERRERS . " as r, " . TABLE_COUNTRIES . " as n where a.entry_country_id = n.countries_id and c.customers_id = r.referrer_customers_id " . "and a.address_book_id = c.customers_default_address_id order by c.customers_lastname"; //$classes_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $referrers_query, $referrers_query_numrows);
$referrerResults = $db->Execute($referrers_query);
PHP Code:
<?php echo $referrers[$selected]['entry_street_address']; ?><br>
<?php // state query here ?>
<?php echo $referrers[$selected]['entry_city'] . ", " . $referrers[$selected]['entry_state'] . " " . $referrers[$selected]['entry_postcode']; ?>
<?php
if ($referrers[$selected]['entry_country_id'] != STORE_COUNTRY) {
echo "<br />" . $referrers[$selected]['countries_name'];
}
?>
what I would like to do is retrieve the zone_name result from the TABLE_ZONES database. However, whenever I try to use an echo state using a $db->Execute command. I get the following error:
PHP Catchable fatal error: Object of class queryFactoryResult could not be converted to string in /xxxx/xxxxx/public_html/xxxxx/referrers.php on line 502
Is there a way to retrieve a single data and output it as a string?
Bookmarks