Martin Skjöldebrand wrote:

> 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:

I read a few more pages in my newbie book and decided to try it like this 
instead:

 
<? if (isset($cmdAddtoKb)) {
$querykb ="SELECT e_description FROM events WHERE t_id = '$t_id';";
$resultkb = mysql_query($querykb, $mysql_link);
$answer = mysql_fetch_row($resultkb);
foreach ($answer As $teststring)          //while we are inside the array
{
    $kb_answer = $teststring;        //pass the current string to the final 
variable 
}

I've got two entries in e_description:
note 1
note 2

Still $kb_answer refuses to become anything other than "note 1". What I'm 
looking to do it to get it to be "note 2" or rather the *last* entry in the 
table e_description that fits the SELECT statement (there might be 1,2, 7 
or 94 entries. I still want $kb_answer to be the last one).

Frustrating being a newbie,

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