PDA

View Full Version : Admin deleted causing erros database


Manoel J?nior
03-02-2014, 11:34 PM
Deleted my administrator user, which I had done numerous posts on forum, unfortunately I was careful to protect myself in config.php and put my user as undeletableusers.

I created a new user with the same name I had, I went into my database and modified my group to be an administrator, right now I'm checking the logs to see which admin gave me this tragedy.

I would like you to help us, because whatever topic I go, where I had commented or even started posting gives SQL error as below:

Invalid SQL:
SELECT * FROM `thread` WHERE `postuserid`=;

MySQL Error : 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 '' at line 1

I've tried to change my userid in the database to my old, who was the userid 1, but still did not work.

Could someone give me a hand as I could fix this error?

PS. Sorry my bad english.

Lynne
03-03-2014, 12:13 AM
I'm not sure I understand what you did. If your user was set as undeleteable in the config.php file, how did you delete it?

If you created a new user and then changed the userid for the user to your old userid, did you make sure to change it in ALL the tables you needed to change it in? It isn't just the user table that uses the userid.

Max Taxable
03-03-2014, 12:36 AM
near '' at line 1Sounds offhand like you have a extra " on line 1 where there's not supposed to be one. Or some character.

What program are you using to edit php files?

Manoel J?nior
03-12-2014, 08:11 PM
I'm not sure I understand what you did. If your user was set as undeleteable in the config.php file, how did you delete it?

If you created a new user and then changed the userid for the user to your old userid, did you make sure to change it in ALL the tables you needed to change it in? It isn't just the user table that uses the userid.

What are the tables? Well I changed my userid to the old and still continue with the same error.

Sounds offhand like you have a extra " on line 1 where there's not supposed to be one. Or some character.

What program are you using to edit php files?

There is error in the file, this occurred because a user deleted my admin user: userid: 1

Lynne
03-13-2014, 12:09 AM
user, userfield, usertextfield. Not to mention post, thread, attachment, visitormessage, etc. So many tables use the userid in them.

Max Taxable
03-13-2014, 01:14 AM
I misunderstood the issue, carry on.