![]() |
PDO One Time Connection? Hi there, Is this real that I can connect one time to mysql using PDO? I mean is that right to do that? If I use the autoloader and I call every time the DATABASE class I'm connecting every time when I call to database class? |
Re: PDO One Time Connection? Yes, PDO is the layer you should be using: PHP: PDO - Manual |
Re: PDO One Time Connection? Quote:
|
Re: PDO One Time Connection? Quote:
|
Re: PDO One Time Connection? Quote:
The second question: if I make DATABASE class using PDO and I call everytime to this class so I reconnect everytime to DB? |
Re: PDO One Time Connection? Quote:
Quote:
In my own software, I connect to the database once at the beginning of the PHP invocation, then I pass the open database handle to any function that needs it, and finally close it ("$db = NULL;") at the very end. |
Re: PDO One Time Connection? Quote:
Quote:
PHP Code: |
Re: PDO One Time Connection? OK. So you're good to go. |
| All times are GMT -6. The time now is 04:54 AM. |