Search Results

Search found 3 results on 1 pages for 'kere puki'.

Page 1/1 | 1 

  • jQuery UI Autocomplete and CodeIgniter

    - by Kere Puki
    I am trying to implement a simple autocomplete script using jQuery UI and CodeIgniter 2 but my model keeps telling me there is an undefined variable so I dont know if my setup is right. My view $(function() { $("#txtUserSuburb").autocomplete({ source: function(request, response){ $.ajax({ url: "autocomplete/suggestions", data: { term: $("#txtUserSuburb").val() }, dataType: "json", type: "POST", success: function(data){ response(data); } }); }, minLength: 2 }); }); My controller function suggestions(){ $this->load->model('autocomplete_model'); $term = $this->input->post('term', TRUE); $rows = $this->autocomplete_model->getAutocomplete($term); echo json_encode($rows); } My Model function getAutocomplete() { $this->db->like('postcode', $term, 'after'); $query = $this->db->get('tbl_postcode'); $keywords = array(); foreach($query->result() as $row){ array_push($keywords, $row->postcode); } return $keywords; } There arent any errors except it doesn't seem to be passing the $term variable to the model.

    Read the article

  • iOS AS3 AIR local storage

    - by Kere Puki
    I am developing an app which requires a SQL DB on the device. I am using the File.applicationStorageDirectory and folder.resolvePath to add a new DB. When debugging the app it all looks like it executes correctly and I am able to successfully create a new table. I haven't gone too far with inserting and reading records however I just wanted to ask, when I re-run the app does the existing DB file get replaced with a new empty one? If so do I need to check if the file exists etc. How can I look at the DB on the device (iOS at this stage)? Thanks

    Read the article

1