<HTML>
<HEAD>
<TITLE>ARSperl Manual - ars_GetEntry</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H2><CODE>ars_GetEntry(ctrl,schema,entry_id,...)</CODE></H2>
This function returns a hash (associative array) of field ids and
values for a given schema and entry id. If you specify any
field ids after the <CODE>entry_id</CODE> parameter, only the values
for those fields will be returned, otherwise all field id value pairs
are returned. All field values are converted into numeric or string
values, except for the diary type. The diary field type is encoded
as an array of hashes. Each hash has a timestamp, user and value
field. <P>
<DL>
<DT><B>On success</B><DD>
Returns a hash. The keys of the hash are the field ids and
the values are the field values.
<DT><B>On failure</B><DD>
Returns <CODE>undef</CODE>.
</DL>
<P>Example:
<PRE>
(%f = ars_GetFieldTable($c, "User")) || die $ars_errstr;
(%vals = ars_GetEntry($c, "User", $entry_id)) || die $ars_errstr;
print "Login name = ".$vals{$f{"Login name"}}."\n";
</PRE>
<P>Example of decoding a diary field:
<PRE>
$diaryfield_fid = ars_GetFieldByName($ctrl, $schema, $diaryfield);
%vals = ars_GetEntry($ctrl, $schema, $entry_id, $diaryfield_fid);
foreach $diary_entry (@{$vals{$diaryfield_fid}}) {
print "$diary_entry-&gt;{timestamp}\n";
print "$diary_entry-&gt;{user}\n";
print "$diary_entry-&gt;{value}\n";
}
</PRE>
See Also: <A HREF="ds_diaryentry_hash.html">Diary Entry Hash
Values</A> and <A href="ds_attach_hash.html">Attachment Hash Values</a>
<P>
<HR WIDTH="30%">
<P>
<A HREF="toc.html"><IMG ALT="&lt;--" SRC="arrow.gif" ALIGN=CENTER> Table of Contents </A>
<p>
<address>
Last changes to this page 26th June 1997 by d.j.adams@soton.ac.uk<br>
&#169; J.C.Murphy, J.W.Murphy 1997 arsperl@arsperl.org
</address>
</BODY>
</HTML>