I am coding a game site. On this site, every question should be displayed to the user only once. Questions ID's are stored in a one field:
name of field in table: hidden_questions
hidden_questions values :1,2,3,17
I'm trying to get the IDs from the database and store them in an array using the implode function:
$q1= array($data['question_id']);
$q2= implode(',', $q1); // returns 1,2,3,4,5
And I want to display a non-repeat question using the following query:
$sql = "SELECT * FROM question WHERE question_id!=('".$q2."') LIMIT 1";
This code does not work and questions with the ID stored in the hidden_questions field are displayed. please guide me.