Created
July 10, 2014 16:22
-
-
Save bytefade/f9f2e50dfe257361eac8 to your computer and use it in GitHub Desktop.
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 | |
try { | |
/* TABELAS: rcsaude_codigo_regional, rcsaude_regional_plano, | |
rcsaude_tabela_plano, rcsaude_tabela_preco */ | |
$q = $conn->query("SELECT *, tabp.tiulo AS tituloPlano | |
FROM rcsaude_codigo_regional cr | |
JOIN rcsaude_regional_plano rp ON cr.codigo=rp.id_codigo_regional | |
JOIN rcsaude_tabela_plano tp ON rp.id_plano=tp.id | |
JOIN rcsaude_tabela_preco tabp ON tp.id_preco=tabp.id | |
WHERE cr.uf='$uf' and id_operadora = '$operadora' | |
ORDER BY `tp`.`sequencia` ASC")->fetchAll(); | |
if(!$q){ | |
echo "Erro QBpreço : " . $conn->errorInfo(); | |
} | |
return $q; | |
} catch (Exception $e) { | |
echo "Erro Bpreço: ".$e->getMessage(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment