sql >> Base de Datos >  >> RDS >> Mysql

PHP, consulta de límite SQL por variable php

¿Has intentado hacer

$result = mysqli_query($conn,"SELECT * FROM comments ORDER BY id DESC limit '$sqlshowvalue'");

a

$result = mysqli_query($conn,"SELECT * FROM comments ORDER BY id DESC limit ".$sqlshowvalue);