in reply to perl and database: argument for the prepare method

The prepare method simply takes valid SQL statement and readies it for submission to the database. What happens underneath is dependant on the DBI you are useing(mySQL, SQLite, Oracle....whatever). I generally prefer to place my query in a string variable, which I usually call $q and then hand that to the prepare method.

my $q = qq(select myfield from mytable order by mydate); my $sth = $dbh->prepare($q);

(not tested) there are other considerations related to security, but to start, that is the basic requirement.

hope that is helpful....

...the majority is always wrong, and always the last to know about it...

Insanity: Doing the same thing over and over again and expecting different results...

A solution is nothing more than a clearly stated problem...otherwise, the problem is not a problem, it is a facct