… | |
… | |
101 | |
101 | |
102 | (not exported by by default) |
102 | (not exported by by default) |
103 | |
103 | |
104 | Connect to the database given by C<($dsn,$user,$pass)>, while using the |
104 | Connect to the database given by C<($dsn,$user,$pass)>, while using the |
105 | flags from C<$flags>. These are just the same arguments as given to |
105 | flags from C<$flags>. These are just the same arguments as given to |
106 | C<DBI->connect>. |
106 | C<< DBI->connect >>. |
107 | |
107 | |
108 | The database handle will be cached under the unique id |
108 | The database handle will be cached under the unique id |
109 | C<$id|$dsn|$user|$pass>. If the same id is requested later, the |
109 | C<$id|$dsn|$user|$pass>. If the same id is requested later, the |
110 | cached handle will be checked (using ping), and the connection will |
110 | cached handle will be checked (using ping), and the connection will |
111 | be re-established if necessary (be sure to prefix your application or |
111 | be re-established if necessary (be sure to prefix your application or |
… | |
… | |
183 | database handle in C<$PApp::SQL::DBH>, which you can set before calling |
183 | database handle in C<$PApp::SQL::DBH>, which you can set before calling |
184 | these functions. |
184 | these functions. |
185 | |
185 | |
186 | =end comment |
186 | =end comment |
187 | |
187 | |
188 | The actual return value from the C<$sth->execute> call is stored in the |
188 | The actual return value from the C<< $sth->execute >> call is stored in |
189 | package-global (and exported) variable C<$sql_exec>. |
189 | the package-global (and exported) variable C<$sql_exec>. |
190 | |
190 | |
191 | If any error occurs C<sql_exec> will throw an exception. |
191 | If any error occurs C<sql_exec> will throw an exception. |
192 | |
192 | |
193 | C<sql_uexec> is similar to C<sql_exec> but upgrades all input arguments to |
193 | C<sql_uexec> is similar to C<sql_exec> but upgrades all input arguments to |
194 | UTF-8 before calling the C<execute> method. |
194 | UTF-8 before calling the C<execute> method. |