Skip to content

Commit

Permalink
Change field name in routers to init_data
Browse files Browse the repository at this point in the history
  • Loading branch information
TimEvens committed Sep 3, 2014
1 parent c5ee517 commit cc3b952
Show file tree
Hide file tree
Showing 3 changed files with 496 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Server/src/DbImpl_mysql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,11 @@ void mysqlBMP::add_Router(tbl_router &r_entry) {
// Build the query
snprintf(buf, sizeof(buf),
"INSERT into %s (%s) values ('%s', '%s', '%s','%s','%s')",
TBL_NAME_ROUTERS, "hash_id,name,description,ip_address,initate_data", r_hash_str.c_str(),
TBL_NAME_ROUTERS, "hash_id,name,description,ip_address,init_data", r_hash_str.c_str(),
r_entry.name, r_entry.descr, r_entry.src_addr, initData.c_str());

// Add the on duplicate statement
strcat(buf, " ON DUPLICATE KEY UPDATE timestamp=current_timestamp,isConnected=1,name=values(name),description=values(description),initate_data=values(initate_data)");
strcat(buf, " ON DUPLICATE KEY UPDATE timestamp=current_timestamp,isConnected=1,name=values(name),description=values(description),init_data=values(init_data)");

// Run the query to add the record
stmt = con->createStatement();
Expand Down
2 changes: 1 addition & 1 deletion database/mysql-openbmp-current.db
Loading

0 comments on commit cc3b952

Please sign in to comment.