Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // irctest.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <iostream>
- #include <string>
- #include <stdio.h>
- #include <stdlib.h>
- #include <my_global.h>
- #include <mysql.h>
- using namespace std;
- int main()
- {
- MYSQL *conn;
- MYSQL_RES *res;
- MYSQL_ROW row;
- char *server = "asdasd.temporum.net";
- char *user = "asdasd";
- char *password = "asdasd";
- char *database = "asdads";
- char *target = "headswe'";
- cout << "Welcome\n";
- conn = mysql_init(NULL);
- if (!mysql_real_connect(conn, server,
- user, password, database, 0, NULL, 0)) {
- cout << (stderr, "%s\n", mysql_error(conn));
- return 0;
- }
- char *query = "SELECT ckey FROM players Where='";
- strcat(query,target);
- if(mysql_query(conn,query)){
- cout << (stderr, "%s\n", mysql_error(conn));
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement