Changeset 95d7add in network-game for server/DataAccess.cpp
- Timestamp:
- May 17, 2014, 6:52:34 PM (11 years ago)
- Branches:
- master
- Children:
- a9e808e
- Parents:
- 84f9797
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/DataAccess.cpp
r84f9797 r95d7add 144 144 ostringstream oss; 145 145 146 if (connection == NULL) { 147 cout << "Error: non database connection exists" << endl; 148 return -1; 149 } 150 146 151 oss << "INSERT into " << table << " (" << columns << ") VALUES (" << values << ")"; 147 152 cout << "query: " << oss.str() << endl; … … 162 167 ostringstream oss; 163 168 169 if (connection == NULL) { 170 cout << "Error: non database connection exists" << endl; 171 return -1; 172 } 173 164 174 oss << "UPDATE " << table << " SET " << values << " WHERE " << where; 165 175 cout << "query: " << oss.str() << endl; … … 179 189 int query_state; 180 190 ostringstream oss; 191 192 if (connection == NULL) { 193 cout << "Error: non database connection exists" << endl; 194 return NULL; 195 } 181 196 182 197 oss << "SELECT * FROM " << table;
Note:
See TracChangeset
for help on using the changeset viewer.