$random_question = qa_db_read_one_assoc( qa_db_query_sub('SELECT * FROM ^posts q INNER JOIN ^posttags t ON q.postid=t.postid INNER JOIN ^words w ON t.wordid=w.wordid WHERE q.type="Q" AND w.word=$ ORDER BY rand() LIMIT 1', "motivational-quotes" ));
It's working thank you so much man.....