Suppose there are 3 combo box.
SELECT COUNTRY
SELECT STATE
SELECT CITY
if i select any country from country conutrylistbox
values in the state will get automatically inserted with
database values>>
THEN on selection of state city will be inserted in city
combo box
If you can help then please Help me...
Answers were Sorted based on User's Feedback
Answer / atul shende
make a database having fields country,state,city
store the information in that i.e list of
country,state,city.
write code on country combobox change index event.
select state from [table] where country='selected country'
store result in dataset or datatable and bind it with state
combo.
same for state combo for seelecting cities of that state.
Is This Answer Correct ? | 12 Yes | 9 No |
Answer / mustkeem
You try this ...script...
<?php
require_once("cities/dao/BaseDao.php");
class CitiesDao extends BaseDao {
public function getCountries() {
$query = "select * from tb_countries order by country asc";
return
$this->execute($this->connection->prepareQuery($query,
Array()));
}
public function getCountryById($idCountry) {
$query = "select * from tb_countries where id_country =
:id_country";
return
$this->getSingleRow($this->connection->prepareQuery($query,
Array("id_country" => $idCountry)));
}
public function getStatesByCountry($idCountry) {
$query = "select * from tb_states where id_country =
:id_country order by state asc";
return
$this->execute($this->connection->prepareQuery($query,
Array("id_country" => $idCountry)));
}
public function getStateById($idState) {
$query = "select * from tb_states where id_state = :id_state";
return
$this->getSingleRow($this->connection->prepareQuery($query,
Array("id_state" => $idState)));
}
public function getCitiesByCountryAndState($idCountry,
$idState) {
$query = "select * from tb_cities where id_country =
:id_country and id_state = :id_state order by city asc";
return
$this->execute($this->connection->prepareQuery($query,
Array("id_country" => $idCountry, "id_state" => $idState)));
}
public function getCityById($idCity) {
$query = "select * from tb_cities where id_city = :id_city";
return
$this->getSingleRow($this->connection->prepareQuery($query,
Array("id_city" => $idCity)));
}
}
?>
Is This Answer Correct ? | 7 Yes | 9 No |
How many times may an objects finalize() method be invoked by the garbage collector?
Where can I find seam examples and documentation?
what is the Remote Stub?
what is an isolation level?
Howmany interfaces are used in RMI?
what is the use of State Factories?
Describe, in general, how java's garbage collector works?
Define the remote interface?
what are the software's needed to develop advanced java 3 tier application project
What is JNI?
What is ioc concept?
On a computer that having single CPU, how multithreading concept can be achieved?