das ist mysql_ da ich mehrere verbindungen habe ist es einfach unbenannt
okay.. jetzt sagt er mir undifinded symbol Handle.. liegt das an der mysql Include ?
das ist mysql_ da ich mehrere verbindungen habe ist es einfach unbenannt
okay.. jetzt sagt er mir undifinded symbol Handle.. liegt das an der mysql Include ?
SQL::query(query, (-1), (0), handle);
Wofür steht SQL ? Bekomme ich undifinded. Muss Handle auch definiert werden ?
nutz strcat..
Du erstellst das erste
dann soll er wieder eine erstellen macht er aber nicht da die Tabelle schon exestiert
Kannst du mir einen kleinen bsp code zeigen ? wäre nett.
Wenn du dir einen Kopfschuss geben willst gerne. Klappt auch so ![]()
Er erstelllt sie jetzt. Packt aber nur die erste Query mit rein ? 2 & 3 packt er nicht mit rein..
mysql_query("CREATE TABLE IF NOT EXISTS `Accounts` (`id` int(11) NOT NULL AUTO_INCREMENT,`Name` varchar(24), `password` varchar(40),`score` int(11),`money` int(11),`level` int(11),`Adminlevel` int(11),`Baned` int(11),`Eingeloggt` int(11),`Alter` int(11),`Geschlecht` int(11),`Skin` int(11),`FSkin` int(11),`Fraktion` int(11),`Member` int(11),`Leader` int(11),`FirstLog` int(11),PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
mysql_query("CREATE TABLE IF NOT EXISTS `Accounts` (`Respektpunkteforlvlup` int(11) NOT NULL AUTO_INCREMENT, `MinutenafterPayDay` int(11), `FirstSpawn` int(11), `Konto` int(11), `Pin` int(11), `Kontozeit` int(11), `Kontoabholen` int(11), `Kontonummer` int(11), `Konto1` int(11), `BGuthaben` int(11), `Handy` int(11), `Marke` int(11), `Anbieter` int(11), `Vertrag` int(11), `Handyaa` int(11), `Handynr` int(11), `Prepaid` int(11),PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
mysql_query("CREATE TABLE IF NOT EXISTS `Accounts` (`Perso` int(11) NOT NULL AUTO_INCREMENT, `LevelKosten` int(11), `Respektpunkte` int(11),`Handyguthaben` int(11),`Jahr` int(11), `Monat` int(11), `Tag` int(11), `Job` int(11), `Pizzen` int(11), `Gehalt` int(11), `Wantedlevel` int(11),PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
Kein error ?
Nope nichts. & den Code führe ich unter OnGameModeInit aus .
Sagt nichts, nur das es aktiviert ist ![]()
Also er erstellt jetzt aber nichts mehr ..
mysql_query("CREATE TABLE IF NOT EXISTS `Accounts` (`id` int(11) NOT NULL AUTO_INCREMENT,`Name` varchar(24), `password` varchar(40), `score` int(11), `money` int(11), `level` int(11) `Adminlevel` int(11), `Baned` int(11),`Eingeloggt` int(11), `Alter` int(11), `Geschlecht` int(11), `Skin` int(11), `FSkin` int(11), `Fraktion` int(11), `Member` int(11), `Leader` int(11), `FirstLog` int(11), PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
Soweit bin ich doch schon -.-
Ich möchte wissen wie ich die beiden COdes in einen bekomme. Weil wenn ich die beiden in einen rein
mache ist der String definitiv zu lang.
//EDIT Jetzt erstellt er keine Tabelle mehr -.-
mysql_query("CREATE TABLE IF NOT EXISTS `Accounts` (Name varchar(24), password varchar(40), score int(11), money int(11), level int(11) Adminlevel int(11), Baned int(11), Eingeloggt int(11), Alter int(11), Geschlecht int(11), Skin int(11), FSkin int(11), Fraktion int(11), Member int(11), Leader int(11), FirstLog int(11), Perso int(11), LevelKosten int(11), Respektpunkte int(11) AUTO_INCREMENT)");
mysql_query("CREATE TABLE IF NOT EXISTS `Accounts` (Respektpunkteforlvlup int(11), MinutenafterPayDay int(11), FirstSpawn int(11), Konto int(11), Pin int(11), Kontozeit int(11), Kontoabholen int(11), Kontonummer int(11), Konto1 int(11), BGuthaben int(11), Handy int(11), Marke int(11), Anbieter int(11), Vertrag int(11), Handyaa int(11), Handynr int(11), Prepaid int(11) AUTO_INCREMENT) ");
mysql_query("CREATE TABLE IF NOT EXISTS `Accounts` (Handyguthaben int(11),Jahr int(11), Monat int(11), Tag int(11), Job int(11), Pizzen int(11), Gehalt int(11), Wantedlevel int(11) AUTO_INCREMENT)");
Ja ist R5.
ist die version so wichtig ? & wodrin besteht der Unterschied zwischen den Versionen ?
Ich glaube R5 bin mir aber nicht sicher ![]()
Ich mag aber beide in die Tabelle eintragen lassen nicht nur eines. & Erklär mir bitte
dieses ALter
Schonen guten Morgen liebe Com,
ich möchte gerne die beiden in eine Tabelle reinpacken, doch das klappt nicht so. Er setzt dann immer die Zweite ?
mysql_query("CREATE TABLE IF NOT EXISTS Accounts(Name VARCHAR(24), password VARCHAR(40), score INT(20), money INT(20), level INT(20) Adminlevel INT(20), Baned INT(20), Eingeloggt INT(20), Alter INT(20), Geschlecht INT(20), Skin INT(20), FSkin INT(20), Fraktion INT(20), Member INT(20), Leader INT(20), FirstLog INT(20), Perso INT(20), LevelKosten INT(20), Respektpunkte INT(20)");
mysql_query("CREATE TABLE IF NOT EXISTS Accounts(Respektpunkteforlvlup INT(20), MinutenafterPayDay INT(20), FirstSpawn INT(20), Konto INT(20), Pin INT(20), Kontozeit INT(20), Kontoabholen INT(20), Kontonummer INT(20), Konto1 INT(20), BGuthaben INT(20), Handy INT(20), Marke INT(20), Anbieter INT(20), Vertrag INT(20), Handyaa INT(20), Handynr INT(20), Prepaid INT(20), Handyguthaben INT(20),Jahr INT(20), Monat INT(20), Tag INT(20), Job INT(20), Pizzen INT(20), Gehalt INT(20), Wantedlevel INT(20) )");
Ich hoffe ihr könnt mir helfen ![]()
//EDIT
Beides in einem ist zu lang ![]()
Problem gelöst ![]()
In welchem Callback hast du es denn?
Unter meinem eigenen. Der nach einem Timer aufgerufen wird. sollte doch auch keine Rolle spielen oder ?
NumRows > 0
Und im else iwie numrows == 0 oder so
Blick ich nicht durch ? ![]()
Versuchs mal mit
main( ) { }
Schönen guten Morgen euch ![]()
Ich habe grade ein Problem. Beim Connecten wird mir immer nur der Login Dialog angezeigt ?
Auch wenn ich nicht registriert bin ? .. Bin neu in Sachen MySQL..
new query[300], pname[24];
GetPlayerName(playerid, pname, 24);
format(query, sizeof(query), "SELECT IP FROM `Accounts` WHERE user = '%s' LIMIT 1", pname);
mysql_query(query);
mysql_store_result();
print("1");
if(mysql_num_rows())
{
mysql_free_result();
new string[256];
format(string,sizeof(string),"{FEFEFE}Willkommen zurück {FFF000}%s{FEFEFE},\ngebe nun dein Passwort für dein Account ein.",SpielerName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"{FF000F}"#Servername"{FEFEFE} - Login",string,"Login","Abbrechen");
}
else
{
mysql_free_result();
new string[256];
format(string,sizeof(string),"{FEFEFE}Herzlich Willkommen {FFF000}%s{FEFEFE},\nUm bei uns Spielen zu können musst du dir bei uns einen Account erstellen.\nGib dein gewünschtes Passwort unten ein,um die Registration fortzusetzten.",SpielerName(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"{FF000F}"#Servername"{FEFEFE} - Account erstellen",string,"Register","Abbrechen");
}
mysql_free_result();
return 1;
//EDIT Problem hat sich geändert gehabt.
Sobald ich ein Passwort nutzten möchte und doppeklick auf die Datenbank mache, das Passwort
eingebe bekomme ich einen Error.
Acces Denided for User ...
Ich würde es mal sagen, er zeiht aus irgendeinen Grund ein falschen Handle.
das einzige was ich machen würde, #define SQL_PASS zu machen ohne die "" oder du setzt passwörter (wozu ich dir raten wurde)
ansonsten würde ich mit handles arbeiten
Ich verstehe leider kein Wort von dem was du dort sagst,
Ausser das mit SQL_PASS ![]()
//EDIT Sobald ich ein Passwort nutzten möchte und doppeklick auf die Datenbank mache, das Passwort
eingebe bekomme ich einen Error.
Acces Denided for User ...
poste mal bitte #defines: SQL_HOST, SQL_USER, SQL_DATA, SQL_PASS
#define SQL_HOST "127.0.0.1"
#define SQL_USER "root"
#define SQL_PASS ""
#define SQL_DATA "test"
S
debug log
Sri ![]()
[04:57:20] >> mysql_connect( )
[04:57:20] CMySQLHandler::CMySQLHandler() - constructor called.
[04:57:20] CMySQLHandler::CMySQLHandler() - Connecting to "127.0.0.1" | DB: "test" | Username: "root" ...
[04:57:20] CMySQLHandler::Connect() - Connection was successful.
[04:57:20] CMySQLHandler::Connect() - Auto-Reconnect has been enabled.
[04:58:05] >> mysql_real_escape_string( Connection handle: 75 )
[04:58:05] >> mysql_real_escape_string() - Invalid connection handle. (You set: 75, Highest connection handle ID is 1).
[04:58:05] >> mysql_query( Connection handle: 51 )
[04:58:05] >> mysql_query() - Invalid connection handle. (You set: 51, Highest connection handle ID is 1).
[04:58:05] >> mysql_store_result( Connection handle: 75 )
[04:58:05] >> mysql_store_result() - Invalid connection handle. (You set: 75, Highest connection handle ID is 1).
[04:58:05] >> mysql_num_rows( Connection handle: 75 )
[04:58:05] >> mysql_num_rows() - Invalid connection handle. (You set: 75, Highest connection handle ID is 1).
[04:58:11] >> mysql_real_escape_string( Connection handle: 75 )
[04:58:11] >> mysql_real_escape_string() - Invalid connection handle. (You set: 75, Highest connection handle ID is 1).
[04:58:11] >> mysql_real_escape_string( Connection handle: 75 )
[04:58:11] >> mysql_real_escape_string() - Invalid connection handle. (You set: 75, Highest connection handle ID is 1).
[04:58:11] >> mysql_query( Connection handle: 51 )
[04:58:11] >> mysql_query() - Invalid connection handle. (You set: 51, Highest connection handle ID is 1).
[04:58:27] >> mysql_real_escape_string( Connection handle: 0 )
[04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).
[04:58:27] >> mysql_real_escape_string( Connection handle: 0 )
[04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).
[04:58:27] >> mysql_real_escape_string( Connection handle: 0 )
[04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).
[04:58:27] >> mysql_real_escape_string( Connection handle: 0 )
[04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).
[04:58:27] >> mysql_query( Connection handle: 80 )
[04:58:27] >> mysql_query() - Invalid connection handle. (You set: 80, Highest connection handle ID is 1).
[04:58:27] >> mysql_real_escape_string( Connection handle: 0 )
[04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).
[04:58:27] >> mysql_real_escape_string( Connection handle: 0 )
[04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).
[04:58:27] >> mysql_real_escape_string( Connection handle: 0 )
[04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).
[04:58:27] >> mysql_real_escape_string( Connection handle: 0 )
[04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).
[04:58:27] >> mysql_query( Connection handle: 80 )
[04:58:27] >> mysql_query() - Invalid connection handle. (You set: 80, Highest connection handle ID is 1).
[04:58:27] >> mysql_real_escape_string( Connection handle: 0 )
[04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).
[04:58:27] >> mysql_real_escape_string( Connection handle: 0 )
[04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).
[04:58:27] >> mysql_real_escape_string( Connection handle: 0 )
[04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).
[04:58:27] >> mysql_real_escape_string( Connection handle: 0 )
[04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).
[04:58:27] >> mysql_query( Connection handle: 80 )
[04:58:27] >> mysql_query() - Invalid connection handle. (You set: 80, Highest connection handle ID is 1).
[04:58:27] >> mysql_real_escape_string( Connection handle: 0 )
[04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).
[04:58:27] >> mysql_real_escape_string( Connection handle: 0 )
[04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).
[04:58:27] >> mysql_real_escape_string( Connection handle: 0 )
[04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).
[04:58:27] >> mysql_real_escape_string( Connection handle: 0 )
[04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).
[04:58:27] >> mysql_query( Connection handle: 80 )
[04:58:27] >> mysql_query() - Invalid connection handle. (You set: 80, Highest connection handle ID is 1).
[04:59:11] >> mysql_real_escape_string( Connection handle: 75 )
[04:59:11] >> mysql_real_escape_string() - Invalid connection handle. (You set: 75, Highest connection handle ID is 1).
[04:59:11] >> mysql_query( Connection handle: 51 )
[04:59:11] >> mysql_query() - Invalid connection handle. (You set: 51, Highest connection handle ID is 1).
[04:59:11] >> mysql_store_result( Connection handle: 75 )
[04:59:11] >> mysql_store_result() - Invalid connection handle. (You set: 75, Highest connection handle ID is 1).
[04:59:11] >> mysql_num_rows( Connection handle: 75 )
[04:59:11] >> mysql_num_rows() - Invalid connection handle. (You set: 75, Highest connection handle ID is 1).
//EDIT
Was bedeutet das jetzt ?