php - Not Able to use ORDER by RAND() LIMIT 4 after users.user_id=".$_SESSION['user_id'] -
I'm not able to use
order by rand () border 5
['user_id']
Is there any way to do this, please help.
$ sqlstate = "Choose from questions *, where users.category_id = questions.category_id and users.user_id =". $ _ Session ['user_id'] Order by rand () Border 5;
You need to fix the string and the containeration.
$ sqlstate = "Choose from the questions *, where users are users.category_id = questions.category_id and users.user_id =". $ _ Session ['user_id']. "RAND () Range 5 by Order";
Alternatively, since you are using PHP, you can only use the variable within double quotes:
$ Sqlstate = "Choose from questions *, where users.category_id = queries.category_id and users.user_id = $ _ session ['user_id'] rand sequence () range 5";
Comments
Post a Comment