• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
search from database using text field and search button

#2
[eluser]Nisha S.[/eluser]
Do you want to search on all the fields? Then you need to add all the fields with or where clause. Use % at the end since you need to display the results starting with an.

Code:
$searchString = 'an';//get it as parameter
$this->db->like('fieldName',$searchString  . '%');


Messages In This Thread
search from database using text field and search button - by El Forum - 07-13-2012, 02:27 AM
search from database using text field and search button - by El Forum - 07-13-2012, 05:26 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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