Advertisement
Guest User

Untitled

a guest
Jul 7th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.84 KB | None | 0 0
  1. // irctest.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <iostream>
  6. #include <string>
  7. #include <stdio.h>
  8. #include <stdlib.h>
  9. #include <my_global.h>
  10. #include <mysql.h>
  11. using namespace std;
  12. int main()
  13. {
  14.     MYSQL *conn;
  15.     MYSQL_RES *res;
  16.     MYSQL_ROW row;
  17.     char *server = "asdasd.temporum.net";
  18.     char *user = "asdasd";
  19.     char *password = "asdasd";
  20.     char *database = "asdads";
  21.     char *target = "headswe'";
  22.     cout << "Welcome\n";
  23.     conn = mysql_init(NULL);
  24.     if (!mysql_real_connect(conn, server,
  25.          user, password, database, 0, NULL, 0)) {
  26.          cout << (stderr, "%s\n", mysql_error(conn));
  27.          return 0;
  28.        }
  29.     char *query = "SELECT ckey FROM players Where='";
  30.     strcat(query,target);
  31.     if(mysql_query(conn,query)){
  32.          cout << (stderr, "%s\n", mysql_error(conn));
  33.          return 0;
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement