Zen Cart Logo
Forums / Contribution-Writing Guidelines / Looking up the zone_name value

Looking up the zone_name value

Views: 1,343

Results 1 to 1 of 1
24 Oct 2012, 4:51 PM
#1
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Looking up the zone_name value

I have the following bits of 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 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?