Another DropList problem
Posted: Thu Jan 12, 2006 9:55 am
I need the following information from the database(2 tables, question and category). Other table includes CategoryId and CategoryText.
Id value comes from the list. So I'm tryin 2 get 1 particular questions information so u can change the information if needed. I'm using droplist and I need 2 get questions CategoryText 2 the Droplist. It should show the feeded CategoryText first but u can change it if needed. So how 2 get those values 2 the droplist. Now I get only the feeded CategoryText there, nothin' else. So it should show the feeded first but there should be other Categories also...
If somebody understand what i'm tryin' 2 say and could help me I'll appreciate it. 
Code: Select all
$query = ("select Id, Answer, Type, QuestionText, Points, CategoryText FROM question, category where question.CategoryId=category.CategoryId and question.Id='$question'");Code: Select all
while ($row = mysql_fetch_array($query)){
echo "<option value='".$row['CategoryId']."'>".$row['CategoryText'];}"</option> ";
"</select>"; "<td> </tr>";