What is the difference between these statemens:

DBIx::Recordset::Undef ('set');
*set = DBIx::Recordset -> Search ({'!DataSource' => $DSN,'!Table' =>
$Table,'$fields' => 'MAX(note.note_key) AS dave'}) ;
push @debugMessage, "new set{dave} = $set{dave}";


DBIx::Recordset::Undef ('set');
$fdat{'!DataSource'} =  GetDSN();
$fdat{'!Table'}      = 'note';
$fdat{'!Fields'}     = 'MAX(note.note_key) AS dave';
$fdat{'=search'}     = 'ok';

*set = DBIx::Recordset->Execute({%fdat});
push @debugMessage, "another one set{dave} = $set{dave}";

To me they seem to be the same except the bottom statement does not produce
a results.
...






-----Original Message-----
From: Gerald Richter [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 27, 2001 11:07 PM
To: Boyd, David; EmbPerl News Group (E-mail)
Subject: Re: Help on using DBIx


You need to give column names when a accessing the result:

$fdat{'!Fields'}     = "employee_key, first_name || ' ' || last_name  as
name";
...
<option value='[+$employeeDat[$row]{employee_key} +]'>[+
$employeeDat[$row]{name} +]</option>

or even better leave out the $row in the second expression, because
otherwise the loop will end when you have an name that return NULL (i.e.
undef)

<option value='[+$employeeDat[$row]{employee_key} +]'>[+ $employeeDat{name}
+]</option>


Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     [EMAIL PROTECTED]         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to