someoneknowhowtosolvealocaweberrorinaddition
$stmt=mysqli_prepare($mysqli,$sql);mysqli_stmt_bind_param($stmt,'i',$id);mysqli_stmt_execute($stmt);$result=mysqli_stmt_get_result($stmt);
Itdoesnotcarrytheproposedfunctioninlocawebhosting.Idecidedtogiveavardumponmynolocalhost
anditbringsmetheresultshoweverinlocawebitdoesnotbringmetheseresults.Ireadthatitcouldbetheversionbecauseinlocawebthedefaultandversion5.2ofphp
intaoIchangedtheversionto5.6butnothingdoesnotappeartheresultscouldanyonehelpme?
Goodonmydetailpagehasthiscode:
$id=$_GET['cod'];$sqql=mysqli_query($mysqli,"SELECT * FROM produtos WHERE id_produto = $id");
$test = mysqli_query($mysqli, "SELECT votos, pontos FROM produtos WHERE id_produto = $id");
$aux = mysqli_fetch_array($sqql);
$idprod = $aux['id_produto'];
$row = mysqli_fetch_array($test);
$voto = $row['votos'];
$ponto = $row['pontos'];
$calc = round(($ponto/$voto),1);
Until this section is working, I gave var_dump($idprod)
and it returns the id of the right product, but now it has the part that brings the result:
$sql = "SELECT * FROM produtos WHERE id_produto = ?";
$stmt = mysqli_prepare($mysqli, $sql);
mysqli_stmt_bind_param($stmt, 'i', $id);
mysqli_stmt_execute($stmt);
$result = mysqli_stmt_get_result($stmt);
while ($aqq = mysqli_fetch_assoc($result)){
$nome = $aqq['nome'];
$desc = $aqq['descricao'];
$preco = $aqq['preco'];
$img = $aqq['img'];
already here in this section I gave var_dump($nome)
the right would be it show me string aaaa but it does not show me anything in locaweb, however I executed the same var_dump
in my localhost and even in the same place it returns me string aaaa