I am trying to create a dynamic chart using query binding with CodeIgniter. The value that is being passed into the query is a form input field. Here is the current query:
$sql = "SELECT * FROM myTable WHERE Municipality = ?";
$qry = $this->db->query($sql, array($this->input->post('myCity')));
This is working fine to create the chart when the page loads. When I am running into trouble is when the user changes the value in the input field. The input field is an autocomplete field and when a new value is selected, the chart does not dynamically update itself to be based on the newly selected municipality.
How can I make the chart dynamically update itself after a new input value is selected?