Perl Noob + DBI : Can't call method without a package or object ref
The following code:
Do I need to cast $result somehow?
Thanks in advance.
first, ive used perl only for the past few months (and not very often) and i have never used DBI--only did basic perl stuff. however, the execute function i believe returns a true or false value. you then try to call the "fetchrow_array()" function on this variable, but i think you should be using $ps not $result.
Ah, I understand now. You're quite right -
"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."
|All times are GMT -5. The time now is 09:35 PM.|