SA-MP Forums Archive
Any MYSQL wiki? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Other (https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: Any MYSQL wiki? (/showthread.php?tid=627424)



Any MYSQL wiki? - AndreiWow - 27.01.2017

For SA:MP...


Re: Any MYSQL wiki? - ISmokezU - 27.01.2017

These?
https://sampwiki.blast.hk/wiki/MySQL_Tutorial
https://sampwiki.blast.hk/wiki/MySQL/R33
https://sampwiki.blast.hk/wiki/MySQL


Re: Any MYSQL wiki? - AndreiWow - 27.01.2017

Even wiki is wrong lol
https://sampwiki.blast.hk/wiki/MySQL_Tutorial


This
Код:
forward ConnectMySQL();
public ConnectMySQL()
{
	mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS))
 
        if(mysql_ping() == 1)
        {    
            mysql_debug(1);
	    printf("[MYSQL]: Connection to `%s` succesful!", SQL_DB);
	} 
	else
	{
	    printf("[MYSQL]: [ERROR]: Connection to `%s` failed!", SQL_DB);
	}
	return 1;
}
This line:
Код:
mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS))
Shouldn't be this?:
Код:
mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);



Re: Any MYSQL wiki? - DerickClark - 27.01.2017

Try up-to-date tut
https://sampforum.blast.hk/showthread.php?tid=627222


Re: Any MYSQL wiki? - renatog - 27.01.2017

As Smoke posted, use this wiki if you're using r40+ https://sampwiki.blast.hk/wiki/MySQL/R40


Re: Any MYSQL wiki? - Sew_Sumi - 28.01.2017

Quote:
Originally Posted by AndreiWow
Посмотреть сообщение
Even wiki is wrong lol
Doesn't even have the error you showed on my browsing of it... Last edited 2010...


Re: Any MYSQL wiki? - AndreiWow - 28.01.2017

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
Doesn't even have the error you showed on my browsing of it... Last edited 2010...
http://imgur.com/a/thUx9


Re: Any MYSQL wiki? - oMa37 - 28.01.2017

Quote:
Originally Posted by AndreiWow
Посмотреть сообщение
It's fine here too lol


Re: Any MYSQL wiki? - Sew_Sumi - 28.01.2017

He must not be seeing the double ), and focusing on the outdated example more than what he should.

The updated tutorials are out there, and handed to you, but seriously, why you end up with double ) is beyond me.


Re: Any MYSQL wiki? - Spmn - 28.01.2017

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
He must not be seeing the double ), and focusing on the outdated example more than what he should.

The updated tutorials are out there, and handed to you, but seriously, why you end up with double ) is beyond me.
Because an old revision had mysql_connect() inside an if clause, and then sb decided to move it out without proper edits.
Just check page history, it is there for a reason. Jeez