我正在做一个使用zend框架的项目,我需要一个动态的ajax城市加载,由州selection.Each州在数据库中关联到城市。
我有一个表单Create.php class Application_Form_Create extends Zend_Form {
public function init() {
$this->setMethod('POST');
...
$state = new Zend_Form_Element_Select('state');
$state->setLabel('States:')
我有一个ASP.NET应用程序,它可以与包含4个表的SQL数据库对话:
城市
州
StatesCities (地图Cities<=>States)
客户(存储他们居住的城市的ID )
我需要统计一下有多少顾客住在一个特定的州。我可以通过以下SQL查询实现这一点:
select count(*) from Customers where CityID in
(
select sc.CityID from StatesCities sc, States s
where sc.StateID = s.StateID AND s.Name = &
我有一个适配器,它从ArrayAdapter扩展,以便用一个对象集合(城市)填充一个微调器。所有的对象和适配器都能正常工作,至少像它看起来的那样。问题是,当我显示所有城市集合时,它是从上到下显示的。
有人知道会发生什么吗?
这是我的适配器
public class AdapterSpinnerListCities extends ArrayAdapter<City> {
// My context
private Context context;
// Values for the spinner (City)
private List<City> listLocat