Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
fd196172
Commit
fd196172
authored
Dec 11, 2012
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(DB): немного подправил h-файл (убрал using std::string)
parent
5e56e5e3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
14 deletions
+12
-14
DBInterface.cc
extensions/DBServer-MySQL/DBInterface.cc
+1
-2
DBInterface.h
extensions/DBServer-MySQL/DBInterface.h
+11
-12
No files found.
extensions/DBServer-MySQL/DBInterface.cc
View file @
fd196172
...
...
@@ -24,7 +24,6 @@
#include <sstream>
#include "DBInterface.h"
using
namespace
std
;
// -----------------------------------------------------------------------------------------
DBInterface
::
DBInterface
()
:
...
...
@@ -192,7 +191,7 @@ bool DBInterface::dropDB(const string dbname)
MYSQL_RES
*
DBInterface
::
listFields
(
const
string
table
,
const
string
wild
)
{
if
(
!
mysql
||
!
result
)
return
false
;
return
0
;
MYSQL_RES
*
res
=
mysql_list_fields
(
mysql
,
table
.
c_str
(),
wild
.
c_str
());
unsigned
int
cols
=
mysql_num_fields
(
result
);
// numCols();
...
...
extensions/DBServer-MySQL/DBInterface.h
View file @
fd196172
...
...
@@ -29,7 +29,6 @@
//#warning Для использования mysql_create нужен define USE_OLD_FUNCTIONS
//#define USE_OLD_FUNCTIONS
#include <mysql/mysql.h>
using
std
::
string
;
// ----------------------------------------------------------------------------
class
DBInterface
{
...
...
@@ -38,20 +37,20 @@ class DBInterface
DBInterface
();
~
DBInterface
();
// bool createDB(const string dbname);
// bool dropDB(const string dbname);
MYSQL_RES
*
listFields
(
const
st
ring
table
,
const
string
wild
);
// bool createDB(const st
d::st
ring dbname);
// bool dropDB(const st
d::st
ring dbname);
MYSQL_RES
*
listFields
(
const
st
d
::
string
table
,
const
std
::
string
wild
);
bool
connect
(
const
st
ring
host
,
const
string
user
,
const
string
pswd
,
const
string
dbname
);
bool
connect
(
const
st
d
::
string
host
,
const
std
::
string
user
,
const
std
::
string
pswd
,
const
st
d
::
st
ring
dbname
);
bool
close
();
bool
query
(
const
string
q
);
const
string
lastQuery
();
bool
insert
(
const
string
q
);
bool
query
(
const
st
d
::
st
ring
q
);
const
st
d
::
st
ring
lastQuery
();
bool
insert
(
const
st
d
::
st
ring
q
);
st
ring
addslashes
(
const
string
&
str
);
st
d
::
string
addslashes
(
const
std
::
string
&
str
);
/*!
проверка связи с БД.
...
...
@@ -73,7 +72,7 @@ class DBInterface
int
insert_id
();
const
MYSQL_ROW
getRow
();
const
string
error
();
const
st
d
::
st
ring
error
();
MYSQL_ROW
Row
;
...
...
@@ -85,7 +84,7 @@ class DBInterface
MYSQL_RES
*
result
;
MYSQL
*
mysql
;
string
lastQ
;
st
d
::
st
ring
lastQ
;
bool
queryok
;
// успешность текущего запроса
bool
connected
;
};
...
...
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