$branco = 0; include '../database.inc'; $query = "SELECT * FROM tab_associados WHERE "; if ($_GET["inicial"]=="") { $inicial = "A"; } else { $inicial = $_GET["inicial"]; } $estadox=""; if ($_GET["estado"]!="") { $estadox = $_GET["estado"]; } $cidadex=""; if ($_GET["cidade"]!="") { $cidadex = $_GET["cidade"]; } if ($_GET["tipo"]=="associado"){ $query = $query."razao_social LIKE '%".$_GET["busca"]."%' "; } else if ($_GET["tipo"]=="produto"){ $query = $query."produtos LIKE '%".$_GET["busca"]."%' "; } else { $query = $query."razao_social LIKE '".$inicial."%' "; } if ( $estadox != "" ) { $query = $query." and estado = '$estadox' "; } if ( $cidadex != "" ) { $query = $query." and cidade = '$cidadex' "; } $query = $query." and lg_ativo = '1' ORDER BY razao_social"; $result = mysql_query($query); $num = mysql_numrows($result); if ( ( $_GET["busca"] == "" ) && ( $estadox == "" ) && ( $cidadex == "" ) && ( $_GET["tipo"]=="associado" ) ) { $branco = 1; } //echo $branco; ?>
![]() |
|||||||||||||||||
|
|
|
||||||||||||||||
|
|||||||||||||||||