[Tutorial] MySQL [R41-2] Registration System
#21

Thanks for your opinion.
Reply
#22

*BUMP

I've been looking for a R42-3 tutorial, the last tutorial I followed gave me errors, is this compatible with 42-3?
Reply
#23

Help please :c
It can't connect so MySQL Server. IDK what to do.
MySQL plugin version R41-3
Log by Log-plugin v0.4
Quote:

[21:04:18] [ERROR] CConnection::CConnection - establishing connection to MySQL database failed: #2013 'Lost connection to MySQL server at 'reading authorization packet', system error: 10060'
[21:04:19] [ERROR] CConnection::CConnection - establishing connection to MySQL database failed: #2013 'Lost connection to MySQL server at 'reading authorization packet', system error: 10060'
[21:04:20] [ERROR] CConnection::CConnection - establishing connection to MySQL database failed: #2013 'Lost connection to MySQL server at 'reading authorization packet', system error: 10060'
[21:04:21] [ERROR] CConnection::CConnection - establishing connection to MySQL database failed: #2013 'Lost connection to MySQL server at 'reading authorization packet', system error: 10060'

EDIT: Anyway...found some1 with same problem on the forum. Only suggestion was - downgrade on version MySQL R41-2. Now works.
Reply
#24

Hi guys, I have some issues on this.

In my script, I make new tables for a database. It seems that I get this error, ** [MySQL]: Unknown column 'fDivision' in 'field list'. If I were to fix that, I'd just delete my existing database, and start up the server, and all the tables that were newly added in the script will be created by itself. But what if I have my players account in that database? How can I make that it would create by itself in the existing database (the newly added tables) upon server execution?
Reply
#25

Quote:
Originally Posted by Uberanwar
View Post
Hi guys, I have some issues on this.

In my script, I make new tables for a database. It seems that I get this error, ** [MySQL]: Unknown column 'fDivision' in 'field list'. If I were to fix that, I'd just delete my existing database, and start up the server, and all the tables that were newly added in the script will be created by itself. But what if I have my players account in that database? How can I make that it would create by itself in the existing database (the newly added tables) upon server execution?
Just add another field from your phpMyadmin.
Reply
#26

Quote:
Originally Posted by AjaxM
View Post
Just add another field from your phpMyadmin.
What if there are a lot of tables added in the script in many different structures? It would be an headache to do that manually I think. If it's not a lot then it would be alright for me to do that manually otherwise
Reply
#27

Quote:
Originally Posted by Uberanwar
View Post
What if there are a lot of tables added in the script in many different structures? It would be an headache to do that manually I think. If it's not a lot then it would be alright for me to do that manually otherwise
Both is not a headache. It is easy to add a field to an existing table or to add a new table.
Reply
#28

So I was bored and looked through the code, and somehow thought that I already saw that code somewhere. Then I remembered: this looks a lot like the example login script from the plugin repository! (https://github.com/pBlueG/SA-MP-MySQ...stem-cache.pwn)
After quickly comparing those scripts: this IS the same code from the example script, with the difference of different variable names and reformulated code comments.
Konstantinos originally wrote this (and an ORM counterpart) script on 26. August 2016.
Reply
#29

forward public OnPlayerDataCheck(playerid, corrupt_check);
Change it
Reply
#30

[22:54:09] plugin.mysql: Unloading plugin...
[22:54:09] plugin.mysql: Plugin unloaded.

I get this on the logs once I try to run the server, any idea what's causing it?
Reply
#31

does MySQL plugins work on ubuntu too?
Reply
#32

Quote:
Originally Posted by Flamehaze7
View Post
does MySQL plugins work on ubuntu too?
Yep, I use plugin for Debian on ubuntu
Reply
#33

Great and useful tutorial, it definitely helped me out!
Reply
#34

Something's wrong going on ...
Whenever I make a new registration and I'll log in I do not win the cash, I need to close my game and open it again to earn cash
Reply
#35

Quote:

Something's wrong going on ...
Whenever I make a new registration and I'll log in I do not win the cash, I need to close my game and open it again to earn cash

Same happens to me, also when I try to register with another username (ID 2), data will be saved into ID 1, so it's not working properly...

EDIT:
This can be fixed by adding below OnPlayerRegister this:
PHP Code:
forward OnPlayerRegister(playerid);
public 
OnPlayerRegister(playerid)
{
    
// retrieves the ID generated for an AUTO_INCREMENT column by the sent query
    
Player[playerid][ID] = cache_insert_id(); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)