Print Thread
Check if database if available
#65607 04/05/24 12:06 PM
Joined: Feb 2017
Posts: 20
V
Valgar Offline OP
Member
OP Offline
Member
V
Joined: Feb 2017
Posts: 20
Is there a way to check if database exists and is available for connection (perhaps similar to 'ping') without trying to connect and wait for a timeout?

Re: Check if database if available
Valgar #65609 04/08/24 08:44 AM
Joined: Aug 1999
Posts: 22,206
Member
Offline
Member
Joined: Aug 1999
Posts: 22,206
There is no specific function for this. You would indeed need to attempt to connect and check the result.


Marco Kalter
Allround Automations
Re: Check if database if available
Valgar #65611 04/08/24 10:42 AM
Joined: Feb 2017
Posts: 20
V
Valgar Offline OP
Member
OP Offline
Member
V
Joined: Feb 2017
Posts: 20
thanks for a quick reply, an idea to implement??

Re: Check if database if available
Valgar #65615 04/09/24 08:27 AM
Joined: Aug 1999
Posts: 22,206
Member
Offline
Member
Joined: Aug 1999
Posts: 22,206
I have added this to the list of enhancement requests.


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.031s Queries: 15 (0.007s) Memory: 2.5038 MB (Peak: 3.0393 MB) Data Comp: Off Server Time: 2024-04-29 19:40:12 UTC
Valid HTML 5 and Valid CSS