16
$query = "Select * from servico where ID_SERVICO = $id";
$result = mysql_query($query);
if($row = mysql_fetch_array($result)) {
$nome = $row['NOME'];
if($nome == 'Marketing') {
include ("servicos/marketing.php");
}
if($nome == 'Web-Marketing') {
include ('servicos/webmarketing.php');
}
if($nome == 'Serviços Web') {
include ("servicos/servicosweb.php");
}
if($nome == 'Design Gráfico') {
include ("servicos/designgrafico.php");
}
}
I have this code and I can’t see the error in it, but it gives me this error. I know there should already be a topic of this on the site but I’ve tried all the ways and nothing. Gives me the bool error(false)
This happens when your query fails, you can print it and test it directly in the bank or make mysq_* show the bank error like this:
$result = mysql_query($query) or die(mysql_error());
– rray
Solved, thank you.
– Márcio André
What was the problem?
– rray
It was a wrong name in the query, my lack of attention.
– Márcio André