la variable GET se obtiene de la url por ejemplo
http://url.do/?ref=referencia1
entonces
Código PHP:
Ver original//obtenemos la vraiable get y la guardamos en la variable recuerda sanitizar tus variables ante cualquier consulta
$busquedaref= $_GET['ref'];
//y aquí metemos la variable.
$query_Recordset1 = sprintf("SELECT * FROM inventario WHERE ". $busquedaref ." LIKE %s", GetSQLValueString
("%" . $colname_Recordset1 . "%", "text"));