PDA

View Full Version : Mysql problem.


TH3_R3Dô
16/07/2013, 03:35 PM
Hello,

That's the error:


Function: mysql_connect called with incorrect parameter count.



mysql_connect("localhost", "root", "CommunityProject", "");


I use this MYSQL (http://forum.sa-mp.com/showthread.php?t=122983) plugin

Thank you.

gtakillerIV
16/07/2013, 03:37 PM
mysql_connect(const host[], const user[], const pass[], const db[]);

I don't think the Database(db) can be null. Read the parameters that are written in the topic.

EDIT: Else you can just remove the const db. mysql_connect(const host[], const user[], const pass[]); and use mysql_select_db(dbname);

TH3_R3Dô
16/07/2013, 03:45 PM
nvm, I solved the problem

DBan
16/07/2013, 03:56 PM
nvm, I solved the problem

What is the solution? This can be used as a reference for others who may experience this problem in the future.