eric_jbdotcom Posted January 14, 2004 Share Posted January 14, 2004 i need this code altered so that i can use a dropdown like the countries one, but without the iso_codes function ////// Returns an array with state_sitereps // TABLES: state_sitereps function tep_get_state_sitereps($state_sitereps_id = '', $with_iso_codes = false) { $state_sitereps_array = array(); if (tep_not_null($state_sitereps_id)) { if ($with_iso_codes == true) { $state_sitereps = tep_db_query("select state_sitereps_name, state_sitereps_iso_code_2, state_sitereps_iso_code_3 from " . TABLE_STATE_SITEREPS . " where state_sitereps_id = '" . (int)$state_sitereps_id . "' order by state_sitereps_name"); $state_sitereps_values = tep_db_fetch_array($state_sitereps); $state_sitereps_array = array('state_sitereps_name' => $state_sitereps_values['state_sitereps_name'], 'state_sitereps_iso_code_2' => $state_sitereps_values['state_sitereps_iso_code_2'], 'state_sitereps_iso_code_3' => $state_sitereps_values['state_sitereps_iso_code_3']); } else { $state_sitereps = tep_db_query("select state_sitereps_name from " . TABLE_STATE_SITEREPS . " where state_sitereps_id = '" . (int)$state_sitereps_id . "'"); $state_sitereps_values = tep_db_fetch_array($state_sitereps); $state_sitereps_array = array('state_sitereps_name' => $state_sitereps_values['state_sitereps_name']); } } else { $state_sitereps = tep_db_query("select state_sitereps_id, state_sitereps_name from " . TABLE_STATE_SITEREPS . " order by state_sitereps_name"); while ($state_sitereps_values = tep_db_fetch_array($state_sitereps)) { $state_sitereps_array[] = array('state_sitereps_id' => $state_sitereps_values['state_sitereps_id'], 'state_sitereps_name' => $state_sitereps_values['state_sitereps_name']); } } return $state_sitereps_array; } anyone know how to properly alter it? im having no success so far Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.