Rev 990 | Rev 1086 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 990 | Rev 1050 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
16 | * See the License for the specific language governing permissions and |
16 | * See the License for the specific language governing permissions and |
17 | * limitations under the License. |
17 | * limitations under the License. |
18 | */ |
18 | */ |
19 | 19 | ||
20 | if (!defined('INSIDE_OIDPLUS')) die(); |
20 | namespace ViaThinkSoft\OIDplus; |
21 | 21 | ||
22 | abstract class OIDplusDatabaseConnection extends OIDplusBaseClass { |
22 | abstract class OIDplusDatabaseConnection extends OIDplusBaseClass { |
23 | protected /*bool*/ $connected = false; |
23 | protected /*bool*/ $connected = false; |
24 | protected /*?bool*/ $html = null; |
24 | protected /*?bool*/ $html = null; |
25 | protected /*?string*/ $last_query = null; |
25 | protected /*?string*/ $last_query = null; |
Line 175... | Line 175... | ||
175 | public function tableExists($tableName): bool { |
175 | public function tableExists($tableName): bool { |
176 | try { |
176 | try { |
177 | // Attention: This query could interrupt transactions if Rollback-On-Error is enabled |
177 | // Attention: This query could interrupt transactions if Rollback-On-Error is enabled |
178 | $this->query("select 0 from ".$tableName." where 1=0"); |
178 | $this->query("select 0 from ".$tableName." where 1=0"); |
179 | return true; |
179 | return true; |
180 | } catch (Exception $e) { |
180 | } catch (\Exception $e) { |
181 | return false; |
181 | return false; |
182 | } |
182 | } |
183 | } |
183 | } |
184 | 184 | ||
185 | public function isConnected(): bool { |
185 | public function isConnected(): bool { |