I have a table containing steps toward solving a problem. I want to pass 
the last entry to another database as a solution.
How do I do this? What I've tried today is:

<? if (isset($cmdAddtoKb)) {      // If I want to move the solution do ...
$querykb ="SELECT e_description FROM events WHERE t_id = '$t_id';";
$resultkb = mysql_query($querykb, $mysql_link);
$answer = mysql_fetch_row($resultkb);
$teststring = current($answer);  // set up a teststring if empty we are                
   
                                            //outside array. First entry is 
                                               //never empty
while ($teststring != "") {              //while we are inside the array
    $kb_answer = $teststring;        //pass the current string to the final 
                                //variable 
    next($answer);                        //go to next string in array
    $teststring = current($answer);  //give testvariable new string
}

What happens is that the while-loop never seems to loop at all. 
I don't get any errors but it simply doesn't assign entry number 2 to
$teststring. It's stuck at entry number 1 (setup outside the loop).

I'm missing something obvious again. What?

TIA

Martin S.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to