I have three table:
user (id,name,password,......) words (id,word,meaning) userword (id, user_id,word_id,checking,old) and i have a query in php :
$user= $_SESSION['userid']; $result = mysql_query("SELECT * FROM words WHERE id IN ( SELECT word_id FROM userword WHERE old =0 AND user_id =$user LIMIT 10 ) "); this query works properly but after this I want to update words that I selected and set old=1 for them what can I do?