Hi all,
I've got a strange problem with MYSQL's concat() function when I use it in a page.
When I'm using the MySQL prompt in telnet I can enter the following query:
select * from categories where 'Golf - Bite Footwear - Baseball Hats and Beanies'=concat(category," - ",subcategory1," - ",subcategory2)
and it work's; I get to see the category which I need.
However, when I want to use it in PHP and do this:
$sql = "select * from categories where 'Golf - Bite Footwear - Baseball Hats and Beanies'=concat(category," - ",subcategory1," - ",subcategory2)";
$result = mysql_query($sql);
I get 0 results.
What am I overlooking?
I've got a strange problem with MYSQL's concat() function when I use it in a page.
When I'm using the MySQL prompt in telnet I can enter the following query:
select * from categories where 'Golf - Bite Footwear - Baseball Hats and Beanies'=concat(category," - ",subcategory1," - ",subcategory2)
and it work's; I get to see the category which I need.
However, when I want to use it in PHP and do this:
$sql = "select * from categories where 'Golf - Bite Footwear - Baseball Hats and Beanies'=concat(category," - ",subcategory1," - ",subcategory2)";
$result = mysql_query($sql);
I get 0 results.
What am I overlooking?