yeah im gonna rewrite the SQL statements to specify values by column name... like i said this script was written for use with my server only... i just made the SQL/server info into variables for other people to use :p
i'll have an updated version here in a few mins. once i eat some dinner that is :D |
Well I still say this is an awsome script and you are awsome for doing this , I am happy to keep using it how it is if you dont feel like messing with it , as it is now everyone just has to use a 0 for the password and do it twice then its fine, its no matter if everyone knows the password cause its the IP that matters.
|
okie i changed the sql statement to include column names.. this should now work properly when creating a new account with any database :)
|
Thanks again on this, is it updated on the previous link?
|
Quote:
|
Yes its 4x and yes I used Cavedudes, that new one is not working for me at all and I just ran into one more problem. Is there anything in the old code that will not allow more then eight accounts to be created? everytime I get eight accounts created every try after that to make another one says there was an error while trying to create your account, then if I delete a couple of the accounts I can make more up till eight accounts again? I am really sorry about this and if you dont feel like messing with it I understand but I still say its an awsome job. Its my problem for not knowing how to read and make this code better myself. Thanks
|
Quote:
If you have something that works (Cavedudes old install?) , then here's an easy way to upgrade; Don't uninstall anything, you can go to my site, download my full DB for MySql4x, Go to MySql Site, Download MySql-Administrator, Go to Eqemu site, download newest binaries - Then restore my database to you your MySql Server, backup your current eqemu configuration, then overwrite the eqemu directory with the newer binaries from eqemu site.- the only file you should keep is your eqemu_config.xml. You'll see where you can set permissions and what-not to any database you have installed via MySql-Admin; Set permissions for newly restored DB. once you have set permissions, you need to point the eqemu to the new database; make changes in the eqemu_config.xml file to that. Theres' links to all this posted at my website. |
I will try this , but one thing
Quote:
|
check your database and see if you have a user entry with the "id" field set to 9
the script increments the id field automatically just in case the mysql database isnt set to auto increment that field. |
user entry? you mean account id? no , i cant get past 8
btw , I am using MYSQL Front , so what ever I need to do in the database is pretty easy. |
execute this query in your database:
Code:
SELECT * FROM `account` WHERE `id` = 9; |
it returned
Code:
Empty set <0.00 sec> |
that's really odd... the only thing i can think of to try is changing line 161 from:
Code:
$sql = "INSERT INTO `account` (`id`,`name`,`charname`,`sharedplat`,`password`,`status`,`lsaccount_id`,`gmspeed`,`revoked`,`minilogin_ip`,`hideme`,`rulesflag`) VALUES (". $newno. ",'". $_POST['username']. "','',0,'". $_POST['password']. "',". $admin_level. ",". $newno. ",0,0,'". $_SERVER['REMOTE_ADDR']. "',0,0)"; Code:
$sql = "INSERT INTO `account` (`id`,`name`,`charname`,`sharedplat`,`password`,`status`,`lsaccount_id`,`gmspeed`,`revoked`,`minilogin_ip`,`hideme`,`rulesflag`) VALUES (NULL,'". $_POST['username']. "','',0,'". $_POST['password']. "',". $admin_level. ",". $newno. ",0,0,'". $_SERVER['REMOTE_ADDR']. "',0,0)"; |
I wouldn't insert 'id' at all, on an auto-increment field.
|
setting it to null will cause it to auto increment as well. as memory serves me older versions of MySQL will spit out an error if your insert query doesnt specify at least a null value for a key
|
All times are GMT -4. The time now is 02:36 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.