12 aug 2005 kl. 11.10 skrev Thomas Nyman:
Hi
I've tried studying perldoc pages, the htmps template pages and
most things relating to dbi etc.
Despite this I have been unable to understand how to dereference
fetchall_arrayref({})
I can dereference fetchall_arrayref() but not fetchall_arrayref
( {} ), i.e the arrayref of hash refs.
I would like to query the database using fetchall_arrayref({}), the
dereference that and perhaps make changes to some values, put it
back into an arrayref({}) and then dump it to html template.
SO far I'm stumped with the first part..i simply cant dereference
the *fg!?*-thing <grinning> .. anyway, please is there some who
can help iterate through arrayref({}) (both key and value).
AN example
I query the database for "Name", "Adress", "Phone", "Fax", "Email"
the $rows = $sth->fetchall_arrayref({});
now i would like to dump my rows into an array and check for
certain values etc, for instance lets say the phonenumber is
represented as 512445566 in the database, but i want it to display
as 512-445566 in the html-template..therefore i would need to
access the "Phone" query, check its format, possibly change it,
insert the new value in my arrayref of hashrefs.
(on my knees and waiting)
Thomas
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile & Plan-Driven Development * Managing Projects & Teams *
Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/
bsce5sf
_______________________________________________
Html-template-users mailing list
Html-template-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/html-template-users
Never mind guys .. I finally figured it out :)
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Html-template-users mailing list
Html-template-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/html-template-users