Evy77 Posted May 4, 2009 Share Posted May 4, 2009 On my original first page my query is the following: SELECT * from tbl_archiefvormers v WHERE v.periode like '%1925%' On page 2 the query is changed to: SELECT * from tbl_archiefvormers v WHERE v.periode like '%' Can someone tell me why the '%19 is changed to ' ? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/156789-problem-in-sending-query-in-paging-function/ Share on other sites More sharing options...
wildteen88 Posted May 4, 2009 Share Posted May 4, 2009 Its most probably some form of character encoding issue. Where on "page 2" is this code used? Need more info than just your query Quote Link to comment https://forums.phpfreaks.com/topic/156789-problem-in-sending-query-in-paging-function/#findComment-825672 Share on other sites More sharing options...
Ken2k7 Posted May 4, 2009 Share Posted May 4, 2009 You should only get that if you echo out the string. Wrap the string in this function - http://us3.php.net/manual/en/function.htmlspecialchars.php, then echo it. Quote Link to comment https://forums.phpfreaks.com/topic/156789-problem-in-sending-query-in-paging-function/#findComment-825680 Share on other sites More sharing options...
Evy77 Posted May 5, 2009 Author Share Posted May 5, 2009 Its most probably some form of character encoding issue. Where on "page 2" is this code used? Need more info than just your query I start with a search in my php page, here the correct query is created. After searching the result is show with a paging function (paging function is in separate php page that I have included). In this paging function I send the sql query to the next page. On page 2 I do a $_GET for my query and show the next result page. Everything happens on the same php page. The code for getting the sql query is the following: $searchsql = stripslashes($_GET['sql']); If you need more info, please ask Quote Link to comment https://forums.phpfreaks.com/topic/156789-problem-in-sending-query-in-paging-function/#findComment-826535 Share on other sites More sharing options...
Evy77 Posted May 5, 2009 Author Share Posted May 5, 2009 You should only get that if you echo out the string. Wrap the string in this function - http://us3.php.net/manual/en/function.htmlspecialchars.php, then echo it. I this is the case, then my query should work, but it doesn't work anymore. Quote Link to comment https://forums.phpfreaks.com/topic/156789-problem-in-sending-query-in-paging-function/#findComment-826536 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.