Hi all

I'm new to html-template and fairly new to perl too.

Anyway I have managed to set up a html form that inputs certain values to a perlscript which in turn queries an mysql database and then outputs the results using html:template and it works very nicely with one exception. If i enter a value in the form that is not in the database i receive an error. Since i use

push @{$rows}, $_ while $_ = $sth->fetchrow_hashref();

i figured..hey this is a hash so i can use

if (exists $rows{$fornamn}) etc .. but alas no. apparently push gets an array and not a hash if I now get it correctly.

Anyway, i was thinking, maybe i can set a conditional in the template so that depending on the value of a row i can output different html code. What i need is to alert the uses that his or her query resulted in no hits. I tried searching in the list but i'm not quite sure what to search for. I would very much appreciate it if someone could help me in the right direction.

Thanks



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Html-template-users mailing list
Html-template-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to