Created
August 4, 2014 00:01
-
-
Save bran921007/b00ee854c8229ab2bd35 to your computer and use it in GitHub Desktop.
Buscar query Danny
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class buscador{ | |
function encontrar($valor){ | |
$valor = mysqli_real_escape_string(conexion::getInstancia(), $valor); | |
$sql = "SELECT * FROM animal where nombre like '%{$valor}%' OR raza like '%{$valor}%' OR tipo like '%{$valor}%' OR sexo like '%{$valor}%'"; | |
$rs = mysqli_query(conexion::getInstancia(), $sql); | |
return $rs; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment