in reply to Perl Not returning SQL query result
prepare simply evaluates the SQL text to create a reusable handle which can then be used to execute the same query any number of times without evaluating the SQL text again. You must then execute the query, possibly supplying a list of values for any ? placeholders which appear, which will be used in this particular execution of the prepared query. Now, you can fetch the results. (For simple, one-time queries, this can simply be done in one step: prepare, then execute, and return the results-handle.)
|