I have variable $page
in my PHP page and in a query I want to use this like:
$query = mysqli_query($con, "SELECT * FROM third LIMIT (3*($page-1)),3");
//right here I want to this math but it gives me error.
I tried it in that way too
$query = mysqli_query($con, "SELECT * FROM third LIMIT (3*{$page-1}),3");
It gave me that message:
syntax error, unexpected '-', expecting '}'
How should do this math in SQL?