Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Edit these details to your mysql database. /phpmyadmin. be sure to have external connection allowed, if not, use 127.0.0.1 (local host) on both.
- forward ConnectMySQL();
- public ConnectMySQL()
- {
- GTADM=mysql_connect("185.25.150.156","virt554_samp", "virt554_samp", "gowno123");
- //example GTADM=mysql_connect("127.0.0.1","gtaserver4279", "gtaserver4279", "maybefuckoff");
- printf("%d",mysql_errno(GTADM));
- if(mysql_errno() != 0)
- {
- mysql_close(GTADM);
- printf("[MYSQL]: [ERROR]:first Connection to `DATABASE` failed!");
- GTADM=mysql_connect("185.25.150.156","virt554_samp", "virt554_samp", "gowno123");
- //example GTADM=mysql_connect("127.0.0.1","gtaserver4279", "gtaserver4279", "maybefuckoff");
- printf("%d",mysql_errno(GTADM));
- if(mysql_errno() != 0)
- {
- mysql_close(GTADM);
- printf("[MYSQL]: [ERROR]:Second Connection to `DATABASE` failed!");
- }
- else
- {
- //mysql_log(LOG_ERROR | LOG_WARNING | LOG_DEBUG);
- printf("[MYSQL]:second Connection to `DATABASE` successful! || %d",GTADM);
- con=2;
- }
- }
- else
- {
- //mysql_log(LOG_ERROR | LOG_WARNING | LOG_DEBUG);
- printf("[MYSQL]:first Connection to `DATABASE` successful! || %d",GTADM);
- con=1;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement