• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database LiveSearch

#15
[eluser]sanir[/eluser]
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Search extends CI_Controller {


public function index()
{
  
}

public function getSearchResults()
{
  $this->load->database();  
  $partialSearch = $_POST['partialSearch'];
  $query = $this->db->select('email_address')
  ->like('email_address', $partialSearch);
  ->get('users');
  
  $result = $query->result();
  $data = "";
  foreach($result as $row){
     $data = $data . "<div>" . $row->email_address . "</div>";
  }
  echo $data;
}
}

Try this code.


Messages In This Thread
Database LiveSearch - by El Forum - 05-30-2012, 06:22 AM
Database LiveSearch - by El Forum - 05-30-2012, 06:52 AM
Database LiveSearch - by El Forum - 05-30-2012, 06:57 AM
Database LiveSearch - by El Forum - 05-30-2012, 07:00 AM
Database LiveSearch - by El Forum - 05-30-2012, 07:00 AM
Database LiveSearch - by El Forum - 05-30-2012, 07:01 AM
Database LiveSearch - by El Forum - 05-30-2012, 07:09 AM
Database LiveSearch - by El Forum - 05-30-2012, 07:13 AM
Database LiveSearch - by El Forum - 05-30-2012, 07:34 AM
Database LiveSearch - by El Forum - 05-30-2012, 07:40 AM
Database LiveSearch - by El Forum - 05-30-2012, 07:57 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:10 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:11 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:13 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:17 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:20 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:22 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:27 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:29 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:30 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:32 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:33 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:36 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:39 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:41 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:42 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:43 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:43 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:45 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:46 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:49 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:57 AM
Database LiveSearch - by El Forum - 05-30-2012, 08:59 AM
Database LiveSearch - by El Forum - 05-30-2012, 09:03 AM
Database LiveSearch - by El Forum - 05-30-2012, 09:08 AM
Database LiveSearch - by El Forum - 05-30-2012, 09:16 AM
Database LiveSearch - by El Forum - 05-30-2012, 09:19 AM
Database LiveSearch - by El Forum - 05-30-2012, 09:27 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.