Nabend,
Versuche gerade ein Register & Loginsystem basierend auf MySQL zu schreiben. Da ich davon nicht soo die Ahnung habe, komme ich mit meinem Problem zu euch.
Der erste, der Connectet und sich registriert, wird auch gespeichert. Alle weiteren werden nicht gespeichert.
mysql_format(mycon,query,sizeof(query),"INSERT INTO `Spieler` (`Name`, `Passwort`, `Adminlevel`, `RegDate`, `RegIP`) VALUES ('%e','%e',0,'%e','%e')", PlayerInfo[playerid][Username], inputtext, query, stringip);
Edit: MySQL_Log eingefügt
[12:43:50] [ERROR] mysql_format - destination size is too small
[12:43:50] [ERROR] CMySQLQuery::Execute[()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Fregg' at line 1
[12:49:01] [ERROR] mysql_format - destination size is too small
[12:49:01] [ERROR] CMySQLQuery::Execute[()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Fregg' at line 1
[12:50:06] [ERROR] mysql_format - destination size is too small
[12:50:06] [ERROR] CMySQLQuery::Execute[()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Fregg' at line 1
[12:51:28] [ERROR] mysql_format - destination size is too small
[12:51:28] [ERROR] CMySQLQuery::Execute[()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Fregg' at line 1
[12:55:27] [ERROR] CMySQLQuery::Execute[()] - (error #1062) Duplicate entry '0' for key 'PRIMARY'
[12:55:27] [ERROR] CMySQLQuery::Execute[()] - (error #1062) Duplicate entry '0' for key 'PRIMARY'
[12:55:28] [ERROR] CMySQLQuery::Execute[()] - (error #1062) Duplicate entry '0' for key 'PRIMARY'
[13:32:31] [ERROR] CMySQLQuery::Execute[()] - (error #1062) Duplicate entry '0' for key 'PRIMARY'
[13:39:11] [ERROR] CMySQLQuery::Execute[()] - (error #1062) Duplicate entry '0' for key 'PRIMARY'
[13:45:02] [ERROR] CMySQLQuery::Execute[()] - (error #1062) Duplicate entry '0' for key 'PRIMARY'
[13:45:51] [ERROR] CMySQLQuery::Execute[()] - (error #1062) Duplicate entry '0' for key 'PRIMARY'
[18:17:03] [DEBUG] mysql_connect - host: "127.0.0.1", user: "root", database: "sampdb", password: "****", port: 3306, autoreconnect: true
[18:17:03] [DEBUG] CMySQLHandle::Create - creating new connection..
[18:17:03] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[18:17:03] [DEBUG] CMySQLHandle::Create - connection created with ID = 1
[18:17:03] [DEBUG] CMySQLConnection::Connect - connection was successful
[18:17:03] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[18:17:03] [DEBUG] CMySQLConnection::Connect - connection was successful
[18:17:03] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[18:17:03] [DEBUG] mysql_errno - connection: 1
[18:17:54] [DEBUG] mysql_format - connection: 1, len: 84, format: "SELECT COUNT(*) AS `count` FROM `User` WHERE `Name` = '%e'"
[18:17:54] [DEBUG] mysql_tquery - connection: 1, query: "SELECT COUNT(*) AS `count` FROM `User` WHERE `Name` = 'FreggelTe", callback: "LoadPlayerDataSequence", format: "dd"
[18:17:54] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
[18:17:54] [DEBUG] mysql_tquery - scheduling query "SELECT COUNT(*) AS `count` FROM `User` WHERE `Name` = 'FreggelTest'"..
[18:17:54] [DEBUG] CMySQLQuery::Execute[LoadPlayerDataSequence(dd)] - starting query execution
[18:17:54] [DEBUG] CMySQLQuery::Execute[LoadPlayerDataSequence(dd)] - query was successful
[18:17:54] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[18:17:54] [DEBUG] CMySQLQuery::Execute[LoadPlayerDataSequence(dd)] - data being passed to ProcessCallbacks()
[18:17:54] [DEBUG] Calling callback "LoadPlayerDataSequence"..
[18:17:54] [DEBUG] cache_get_field_content_int - row: 0, field_name: "count", connection: 1
[18:17:54] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "count", data: "0"
[18:17:54] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[18:17:54] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called
[18:17:57] [DEBUG] mysql_format - connection: 1, len: 280, format: "INSERT INTO `User` (`Name`, `Passwort`, `Adminlevel`, `RegDate`, `RegIP`) VALUES('%e','%e',0,'%e','%e')"
[18:17:57] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO `User` (`Name`, `Passwort`, `Adminlevel`, `RegDate`,", callback: "(null)", format: "(null)"
[18:17:57] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
[18:17:57] [DEBUG] mysql_tquery - scheduling query "INSERT INTO `User` (`Name`, `Passwort`, `Adminlevel`, `RegDate`, `RegIP`) VALUES('FreggelTest','test',0,'20.01.2014','127.0.0.1')"..
[18:17:57] [DEBUG] CMySQLQuery::Execute[()] - starting query execution
[18:17:57] [DEBUG] CMySQLQuery::Execute[()] - error will be triggered in OnQueryError
[18:17:57] [DEBUG] CMySQLQuery::Execute[()] - data being passed to ProcessCallbacks()
[18:17:57] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called
[18:17:58] [DEBUG] mysql_format - connection: 1, len: 174, format: "UPDATE `User` SET `Adminlevel` = %d WHERE `Name` = '%e'"
[18:17:58] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `User` SET `Adminlevel` = 0 WHERE `Name` = 'FreggelTest'", callback: "(null)", format: "(null)"
[18:17:58] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
[18:17:58] [DEBUG] mysql_tquery - scheduling query "UPDATE `User` SET `Adminlevel` = 0 WHERE `Name` = 'FreggelTest'"..
[18:17:58] [DEBUG] CMySQLQuery::Execute[()] - starting query execution
[18:17:58] [DEBUG] CMySQLQuery::Execute[()] - query was successful
[18:17:58] [DEBUG] CMySQLQuery::Execute[()] - no callback specified, skipping result saving
[18:17:58] [DEBUG] CMySQLQuery::Execute[()] - data being passed to ProcessCallbacks()
[18:17:58] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called
Edit: Da ich keine Ahnung von den Errors habe, bitte ich vllt um Erklärung