Query does not return value

Asked

Viewed 24 times

0

I have a query in the header of the page that returns the title, the meta name="Description" and the meta name="Keywords" that works very well. However, applying this same query structure in the body of the page does not return any value. I already tested the query in Phpmyadmin and it is correct. But the page doesn’t work.

$limi = 1;
$tit = BD::conn()->prepare("SELECT id_orclinha, dc, orclinha
FROM pe_orclinhas
WHERE id_orclinha = 458 
LIMIT 0 , ?");
$tit->execute(array($limi));
$dados = $tit->fetch();
$cabeca = $dados['orclinha'];   

echo $cabeca;
  • 3

    Probably he’s escaping to LIMIT 0, "1", rendering invalid.

  • That’s right, brother. Thank you

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.