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
685db12e
Commit
685db12e
authored
Feb 28, 2016
by
Armando Lüscher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify ConversationDB to use new database schema and names.
parent
6f7e3611
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
ConversationDB.php
src/ConversationDB.php
+5
-7
No files found.
src/ConversationDB.php
View file @
685db12e
...
...
@@ -72,14 +72,13 @@ class ConversationDB extends DB
/**
* Insert the conversation in the database
*
* @param string $conversation_command
* @param string $conversation_group_name
* @param int $user_id
* @param int $chat_id
* @param string $command
*
* @return bool
*/
public
static
function
insertConversation
(
$
conversation_command
,
$conversation_group_name
,
$user_id
,
$chat_i
d
)
public
static
function
insertConversation
(
$
user_id
,
$chat_id
,
$comman
d
)
{
if
(
!
self
::
isDbConnected
())
{
return
false
;
...
...
@@ -88,10 +87,10 @@ class ConversationDB extends DB
try
{
$sth
=
self
::
$pdo
->
prepare
(
'INSERT INTO `'
.
TB_CONVERSATION
.
'`
(
`status`, `
conversation_command`, `conversation_name`, `user_id`, `chat_i
d`, `data`, `created_at`, `updated_at`
`status`, `
user_id`, `chat_id`, `comman
d`, `data`, `created_at`, `updated_at`
)
VALUES (
:status, :
conversation_command, :conversation_name, :user_id, :chat_i
d, :data, :date, :date
:status, :
user_id, :chat_id, :comman
d, :data, :date, :date
)
'
);
$active
=
'active'
;
...
...
@@ -100,8 +99,7 @@ class ConversationDB extends DB
$created_at
=
self
::
getTimestamp
();
$sth
->
bindParam
(
':status'
,
$active
);
$sth
->
bindParam
(
':conversation_command'
,
$conversation_command
);
$sth
->
bindParam
(
':conversation_name'
,
$conversation_group_name
);
$sth
->
bindParam
(
':command'
,
$command
);
$sth
->
bindParam
(
':user_id'
,
$user_id
);
$sth
->
bindParam
(
':chat_id'
,
$chat_id
);
$sth
->
bindParam
(
':data'
,
$data
);
...
...
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