Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
773f4dd6
Commit
773f4dd6
authored
Apr 21, 2011
by
Max-Wilhelm Bruker
Browse files
added id_server to servermessages table
parent
c4ba33df
Changes
2
Hide whitespace changes
Inline
Side-by-side
servatrice/servatrice.sql
View file @
773f4dd6
...
...
@@ -126,6 +126,7 @@ CREATE TABLE `cockatrice_uptime` (
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
utf8
;
CREATE
TABLE
`cockatrice_servermessages`
(
`id_server`
tinyint
(
3
)
not
null
default
0
,
`timest`
datetime
NOT
NULL
default
'0000-00-00 00:00:00'
,
`message`
text
,
PRIMARY
KEY
(
`timest`
)
...
...
servatrice/src/servatrice.cpp
View file @
773f4dd6
...
...
@@ -333,7 +333,8 @@ void Servatrice::updateLoginMessage()
QMutexLocker
locker
(
&
dbMutex
);
checkSql
();
QSqlQuery
query
;
query
.
prepare
(
"select message from "
+
dbPrefix
+
"_servermessages order by timest desc limit 1"
);
query
.
prepare
(
"select message from "
+
dbPrefix
+
"_servermessages where id_server = :id_server order by timest desc limit 1"
);
query
.
bindValue
(
":id_server"
,
serverId
);
if
(
execSqlQuery
(
query
))
if
(
query
.
next
())
{
loginMessage
=
query
.
value
(
0
).
toString
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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