Welcome Guest, Not a member yet? Register   Sign In
not query string &
#1

[eluser]nhantam[/eluser]
When I search my web
Example

Search:
SELECT * FROM products WHERE (productName LIKE "%Coton & Size%") LIMIT 0,20
result = 0;
If I search: productName LIKE "%Coton Size%"
result = 1


But when I search on http://localhost/phpmyadmin
SELECT * FROM products WHERE (productName LIKE "%Coton & Size%") LIMIT 0,20
result = 1

Please check character & in query string

-------------
my code:
$sql = 'SELECT * FROM products WHERE (productName LIKE "%Coton & Size%") LIMIT 0,20';
$query = $this->db->query($sql);




Theme © iAndrew 2016 - Forum software by © MyBB