You could create a substring from your parameter and then use that in your
query, if the URL variable was named strParam, you could do this in php
$param = $_GET['strParam'];
$paramThree = substr($param,0,3);
Then use the $ParamThree in your query, you might want to include the sprintf
for security.
Check this link
http://us3.php.net/manual/en/function.substr.php