Keep It Simple, Stupid | |
PerlMonks |
Re: Perl Not returning SQL query resultby 1nickt (Canon) |
on May 11, 2021 at 12:25 UTC ( [id://11132398]=note: print w/replies, xml ) | Need Help?? |
Hi, Where does $sth come from, other than C&P from the doc? To quote the DBI doc: For SELECT statements, execute simply "starts" the query within the database engine. Use one of the fetch methods to retrieve the data after calling execute. The execute method does not return the number of rows that will be returned by the query (because most databases can't tell in advance), it simply returns a true value. Hope this helps!
The way forward always starts with a minimal test.
In Section
Seekers of Perl Wisdom
|
|