Welcome Guest, Not a member yet? Register   Sign In
help with SQL query
#2

[eluser]danmontgomery[/eluser]
Code:
$esc_term = $this->db->escape_like_str($term);

$query = $this -> db -> from('product_info AS p')
    -> join('product_info_detail AS pd', 'p.product_id = pd.product_id')
    -> where('p.active', 1)
    -> where('pd.language_id', $lang)
    -> where('( pd.product_id LIKE "%' . $esc_term . '%" OR pd.title LIKE "%' . $esc_term . '%" OR pd.description LIKE "%' . $esc_term . '%" )', NULL, FALSE)
    -> get();


Messages In This Thread
help with SQL query - by El Forum - 02-02-2010, 09:42 AM
help with SQL query - by El Forum - 02-02-2010, 10:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB