Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
TelegramBot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
TelegramBot
Commits
2ed005e0
Commit
2ed005e0
authored
Mar 31, 2016
by
MBoretto
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/externalconnection' into develop
parents
326462f6
a75bb993
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
README.md
README.md
+1
-1
DB.php
src/DB.php
+1
-1
Telegram.php
src/Telegram.php
+1
-1
No files found.
README.md
View file @
2ed005e0
...
...
@@ -392,7 +392,7 @@ You can also store inline query and chosen inline query in the database.
Is possible to provide to the library an external mysql connection. Here's how to configure it:
```
php
$telegram
->
enableExternalMy
SQL
(
$external_pdo_connection
)
$telegram
->
enableExternalMy
sql
(
$external_pdo_connection
)
//$telegram->enableExternalMySQL($external_pdo_connection, $table_prefix)
```
### Channels Support
...
...
src/DB.php
View file @
2ed005e0
...
...
@@ -110,7 +110,7 @@ class DB
throw
new
TelegramException
(
'MySQL external connection not provided!'
);
}
self
::
$pdo
=
$
pdo
;
self
::
$pdo
=
$
external_pdo_connection
;
self
::
$telegram
=
$telegram
;
self
::
$mysql_credentials
=
null
;
self
::
$table_prefix
=
$table_prefix
;
...
...
src/Telegram.php
View file @
2ed005e0
...
...
@@ -188,7 +188,7 @@ class Telegram
* @param PDO $external_pdo_connection PDO database object
* @param string $table_prefix
*/
public
function
enableExternalMy
SQL
(
$external_pdo_connection
,
$table_prefix
=
null
)
public
function
enableExternalMy
sql
(
$external_pdo_connection
,
$table_prefix
=
null
)
{
$this
->
pdo
=
DB
::
externalInitialize
(
$external_pdo_connection
,
$this
,
$table_prefix
);
$this
->
mysql_enabled
=
true
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment