Welcome Guest, Not a member yet? Register   Sign In
Quotes in query
#12

[eluser]ivantcholakov[/eluser]
Code:
// Place within a controller's method that should process user input (POST).

    $zipcodes =
        explode(' ',
            trim(
                preg_replace('/\s+/', ' ',
                    preg_replace('/[^0-9]/', ' ', $this-input->post['zipcodes'])
                )
            )
        );

    // var_dump($zipcodes);

    $this->db
        ->select()
        ->from('table')
        ->where_in('zipcode', $zipcodes)
        ->get()
        ->result_array();

    //var_dump($result_array);


Messages In This Thread
Quotes in query - by El Forum - 10-21-2013, 01:18 AM
Quotes in query - by El Forum - 10-21-2013, 02:17 AM
Quotes in query - by El Forum - 10-21-2013, 02:40 AM
Quotes in query - by El Forum - 10-21-2013, 03:50 AM
Quotes in query - by El Forum - 10-21-2013, 05:00 AM
Quotes in query - by El Forum - 10-21-2013, 05:02 AM
Quotes in query - by El Forum - 10-21-2013, 05:16 AM
Quotes in query - by El Forum - 10-21-2013, 05:28 AM
Quotes in query - by El Forum - 10-21-2013, 05:36 AM
Quotes in query - by El Forum - 10-21-2013, 05:51 AM
Quotes in query - by El Forum - 10-21-2013, 06:10 AM
Quotes in query - by El Forum - 10-21-2013, 07:10 AM
Quotes in query - by El Forum - 10-21-2013, 07:15 AM
Quotes in query - by El Forum - 10-21-2013, 07:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB