I have an sql query to fetch data from database in php. I am using the limit to limit data. I need to limit data according to the id in the url.
How can I call the id in the sql query. I have tried the following but it's showing an error:
$response=mysqli_query($con,"select * from prometric ORDER BY RAND() LIMIT echo $_GET['id']; ");
and the error is
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in C:\xampp\htdocs\nurse\prometricajax.php on line 14