Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
<?php
require_once('inc/functions.php');
$sql = "
SELECT DISTINCT pf.nome AS Nome, pf.tipo AS Tipo, pf.proc AS Procedimento, pf.cidade AS Cidade, pf.estado AS Estado, pf.espc AS Espc
FROM registro_pf pf
JOIN tipo tipo
ON tipo.id = pf.tipo
JOIN procedimento_pf proc_pf
ON proc_pf.id_pf = pf.id
JOIN procedimentos proc
ON proc.id = proc_pf.id_proc
JOIN especialidades espc
ON espc.id = pf.espc
JOIN tb_cidades cidades
ON cidades.id = pf.cidade
JOIN tb_estados estado
ON estado.id = pf.estado
ORDER BY pf.nome ASC
";
mysql_select_db($database,$conndb);
$rs = mysql_query($sql,$conndb) or die(mysql_error());
$rows = mysql_fetch_assoc($rs);
$tot_rows = mysql_num_rows($rs);
?><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Grupo Viva Mais</title>
<meta name="description" content="Advanced Search Form" />
<meta name="keywords" content="Advanced Search Form" />
<meta http-equiv="imagetoolbar" content="no" />
<link href="style/core.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="out">
<div id="ph">
<div id="phin">
<div id="phin2">
<h1> </h1>
<h3>qualquer coisa</h3>
</div>
</div>
</div>
<div id="menu">
</div>
<div id="wr">
<div id="hd">
<p><br />
A Rede VIVA MAIS Saúde possui ampla cobertura em âmbito nacional, provendo acesso particular de qualidade a médicos, laboratórios, clínicas e hospitais, com redução de até 80% em relação ao valor particular praticado. Quem possui um cartão VIVA MAIS não precisa esperar por meses para agendar uma consulta ou exame e ainda pode escolher o médico de sua preferência.</p>
</div>
<div id="cnt">
<h2>Preencha os campos de pesquisa:</h2>
<form id="search_form" name="search_form" method="get" action="">
<table width="1200" border="0" cellpadding="0" cellspacing="0" class="tbl_repeat">
<tr>
<td colspan="6" bgcolor="#FFFFFF">Use os filtros para otimizar sua busca.</td>
</tr>
<tr>
<th width="161" scope="row"><label for="srch_for4"><img src="images/int.png" width="10" height="10" /> Nome:</label></th>
<td width="726"><input type="text" name="srch_for" id="srch_for4" class="f_fld" value="<?php getSticky(1,'srch_for'); ?>" /></td>
<td width="65"> </td>
<td width="51"> </td>
<th width="66"><label for="srch_tipo"><img src="images/int.png" alt="" width="10" height="10" /> Tipo: </label></th>
<td width="131"><?php getTipo(); ?></td>
</tr>
<tr>
<th scope="row"><label for="srch_espc">Especialidade:</label></th>
<td><?php getEspecialidades(); ?></td>
<td> </td>
<td width="51"> </td>
<th class="item"><label for="srch_estado"> Estado:</label></th>
<td><?php getEstado(); ?></td>
</tr>
<tr>
<th class="item" scope="row"><label for="srch_proc"><img src="images/int.png" alt="" width="10" height="10" /> Procedimento: <br />
</label></th>
<td><input type="text" name="srch_for2" id="srch_for2" class="f_fld2" value="<?php getSticky(1,'srch_for'); ?>" /></td>
<th nowrap="nowrap"><label for="srch_cidade"> Cidade:</label></th>
<td colspan="3"><?php getCidade(); ?></td>
</tr>
<tr>
<td colspan="6"><label for="btn" class="sbm fl_r">
<input type="submit" id="btn" class="btn" value="Search" />
</label></td>
</tr>
</table>
</form>
<?php if ($num_rows > 0) { ?>
<table border="0" cellspacing="0" cellpadding="0" class="tbl_repeat">
<tr>
<th width="14%" class="col_10 al_r"> </th>
<th width="18%">Tipo</th>
<th width="19%" class="col_15">Nome</th>
<th width="21%" class="col_15">Procedimentos Negociados</th>
<th width="14%" class="col_10 al_r">Cidade</th>
<th width="14%" class="col_10 al_r">CEP</th>
</tr>
<?php do { ?>
<tr>
<td class="al_r">ver detalhes</td>
<td><?php echo $rows['Tipo']; ?></td>
<td><?php echo $rows['Nome']; ?></td>
<td><?php echo $rows['Procedimento']; ?></td>
<td class="al_r"><?php echo $rows['Estado']; ?></td>
<td class="al_r"><?php echo "$".$rows['Preco']; ?></td>
</tr>
<?php } while($rows = mysql_fetch_assoc($rs)); ?>
</table>
<p>
<?php
} else {
if (is_array($queries) && !empty($queries)) {
echo "<p>Não existe resultado para os seus critérios de busca</p>";
} else {
echo "<p>Resultado não disponível.</p>";
}
} ?>
</p>
<p> </p>
<p> </p>
</div>
</div>
</div>
<div id="ft">
<div id="ftin">
<p> </p>
</div>
</div>
</body>
</html>
<?php mysql_free_result($rs); ?>
alguém sabe me dizer pq o meu numero de linhas continua retornando 0?
Carregando comentários...