Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. void AddURLToDB(string *result, string todaysDate, Connection *connection){
  2.  
  3. Query query = connection->query();
  4.  
  5. query << "SELECT url FROM " + todaysDate + " WHERE (url)='" + (*result) + "'";
  6. StoreQueryResult res = query.store();
  7. if (res){
  8. Row row = res[0];
  9. if (row.empty()){
  10. cout << (*result) << endl;
  11. }
  12. else {
  13. cout << (*result) << "already in DB" << endl;
  14. }
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement