SA-MP Forums Archive
mysql_connect in R40 , I don't understand the credentials - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: mysql_connect in R40 , I don't understand the credentials (/showthread.php?tid=619324)



mysql_connect in R40 , I don't understand the credentials - Gotham - 16.10.2016

Hi guys,
When I compiled with
PHP Code:
mysql mysql_connect(HOST,USER,DATABSE,PASS); 
It said tag mismatch , I didn't get what maddinat0r meant , I am pretty new to MySQL


Re: mysql_connect in R40 , I don't understand the credentials - Gotham - 16.10.2016

Reply anyone!?


Re: mysql_connect in R40 , I don't understand the credentials - Konstantinos - 16.10.2016

https://sampwiki.blast.hk/wiki/MySQL/R40#mysql_connect

PS: Don't bump after 7 minutes, there are rules; please follow them.


Re: mysql_connect in R40 , I don't understand the credentials - NeXoR - 16.10.2016

Show me where you define HOST, USER, DATABSE, PASS and "mysql" variable.


Re: mysql_connect in R40 , I don't understand the credentials - NeXoR - 16.10.2016

Nevermind, here is a fix:
Quote:

mysql = mysql_connect(HOST, USER, PASS, DATABSE)

First Pass - then Database


Re: mysql_connect in R40 , I don't understand the credentials - Gotham - 16.10.2016

but I don't know what to do with them..
MySQLOpt:AUTO_RECONNECT = MySQLOpt:0 makes it worse..


Re: mysql_connect in R40 , I don't understand the credentials - NeXoR - 16.10.2016

Quote:
Originally Posted by Gotham
View Post
but I don't know what to do with them..
MySQLOpt:AUTO_RECONNECT = MySQLOpt:0 makes it worse..
My code doesn't work ?


Re: mysql_connect in R40 , I don't understand the credentials - Gotham - 16.10.2016

No NeXoR It still gives me warnings..


Re: mysql_connect in R40 , I don't understand the credentials - AMouldyLemon - 16.10.2016

Code:
new MySQL:mysql;



Re: mysql_connect in R40 , I don't understand the credentials - Gotham - 16.10.2016

what about
PHP Code:
cache_get_data(rows,fields,mysql?); 
?


Re: mysql_connect in R40 , I don't understand the credentials - NeXoR - 16.10.2016

Quote:
Originally Posted by Gotham
View Post
what about
PHP Code:
cache_get_data(rows,fields,mysql?); 
?
According to the wikipedia, this function doesn't exist.
Try using this:
PHP Code:
cache_get_row_count(rows); 



Re: mysql_connect in R40 , I don't understand the credentials - Gotham - 17.10.2016

What about mysql?