Welcome Guest, Not a member yet? Register   Sign In
Search multiple coloumn with multiple field
#1

[eluser]harris_priambudi[/eluser]
Hi Everybody..

I have a problem
I want to create an search module with 3 dropdown box in 3 different coloumn database

this for simple example model
Code:
$car_name = $this->input->post('car_name');
$car_colour = $this->input->post('car_id');
$car_horsepower = $this->input->post('car_horsepower');

$string_query = "SELECT * FROM car_data WHERE
(car_name = '$car_name') or
(car_colour = '$car_colour') or
(car_horsepower = '$car_horsepower')"
$query = $this->db->query($string_query);
when I try this code.. I choose
car name = x
carcolour = blue
car horsepower = 1000

but the result is not right..
the carname x who has colour red is appear..

can you help me to solve this problem? thx
(sorry for bad english)


Messages In This Thread
Search multiple coloumn with multiple field - by El Forum - 06-06-2012, 06:27 AM
Search multiple coloumn with multiple field - by El Forum - 06-06-2012, 06:30 AM
Search multiple coloumn with multiple field - by El Forum - 06-06-2012, 06:36 AM
Search multiple coloumn with multiple field - by El Forum - 06-06-2012, 06:47 AM
Search multiple coloumn with multiple field - by El Forum - 06-06-2012, 07:30 AM
Search multiple coloumn with multiple field - by El Forum - 06-06-2012, 07:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB