cdjohn Posted May 4, 2007 Share Posted May 4, 2007 I am passing a variable called printer to a search:- $query = "SELECT iatcode,manuf,printer,description,colour,sell,lcap,category, Comporig FROM products where manuf = '".$picture."' and printer = ' ".$printer." ' order by Comporig, printer If the passed variable printer contains a plus (+) sign then no results are returned. How can I recode the statement to allow such a search? Link to comment https://forums.phpfreaks.com/topic/50063-plus-sign-in-a-variable/ Share on other sites More sharing options...
Barand Posted May 4, 2007 Share Posted May 4, 2007 If column "printer" is defined as INT (or other numeric type) then the + is OK. If it is varchar or char then it isn't Link to comment https://forums.phpfreaks.com/topic/50063-plus-sign-in-a-variable/#findComment-245744 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.