php db. Some of my entries in the db are 3 letters (no varchar needed really). When I run searches for these entries I get 0 results.
Not sure if this is set in phpadmin or in my code. I have attached my output snippet, assuming the error is with my line. (I've cut out preg_replace line).
$search_output = "";
if(isset($_POST['searchquery']) && $_POST['searchquery'] != "")
{
$searchquery = preg_replace('#[^a-z 0-9?!]#i', '', $_POST['searchquery']);
$sqlCommand = "SELECT id, a, b, c, d FROM db WHERE a LIKE '%$searchquery%'";
}
And my output snippet:
if($count > 0){
$search_output .= "$count result(s) for $searchquery"};
When the term is 3 letters - assume it is "get", $scount gives 0.
$search_output = $count results message;
Not sure where my "glitch" is. phpadmin or my code? I suspect my code? But there's nowhere where I assign set a minimum limit....