4
would like to know how I use this command mysql
in my code because I’m trying and nothing I can’t make it work.
code:
$sql = mysqli_query($mysqli, "SELECT * FROM produtos LIMIT $inicio, $totalProduto");
while($aux = mysqli_fetch_array($mysqli, $sql)){
$id = $aux['id_produto'];
$nome = $aux['nome'];
$desc = $aux['descricao'];
$preco = $aux['preco'];
$categoria = $aux['categoria'];
$img = $aux['img'];
$tipo = $aux['type'];
$size = $aux['size'];
And what’s the problem? And I already see a crazy thing there that the local variables do not match the names of the members of the objects. It can, but it doesn’t make sense. Another problem is the use of
$mysqli
as a parameter.– Maniero