By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,664 Members | 1,656 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,664 IT Pros & Developers. It's quick & easy.

Help! I disabled admin access on my admin account :(

P: 5
I'm hoping someone can help me.
I was trying to backup our eqdkp database and managed to remove all the admin access from the admin account :(

I cannot use phpmyadmin or mysql to directly access the database to fix it.

From what I can see the code below should do what I want but it just gives me an error: Parse error: parse error, unexpected T_IF in /home/httpd/dynamic/phantomraiders/eqdkp/admin/tmp.php on line 9

Any help would be very much appreciated.

Thanks.

[PHP]<?php

define('EQDKP_INC', true);
$eqdkp_root_path = '../';
include_once($eqdkp_root_path . 'common.php');

$sql = "UPDATE eqdkp_auth_users SET auth_setting='Y' WHERE user_id = '1'"

if (!($return_code = $db->query($sql)))
{
message_die('Could not run that command ', '', __FILE__, __LINE__, $sql);
}

?>[/PHP]
Oct 25 '08 #1
Share this Question
Share on Google+
2 Replies


P: 3
Soy ou tried backing up your information, and you screwed something up.. Do you know exactly what it is you screwed up? Have you tried running a "SELECT * FROM" to make sure query to make sure there is even an administrative account to edit?
Oct 25 '08 #2

Atli
Expert 5K+
P: 5,058
Hi.

I see two things wrong with that code.

First, the semicolon is missing from line #7. (The one with the query)
Which is causing the parse error you mentioned.

And second, the value for the "user_id" column in your query is enclosed in single-quote marks.
Numbers should not be quoted, only strings and dates.

And by the way.

Please use [code] tags when posting your code examples. (See How to ask a question)

[code=php] ...PHP code goes here... [/code]

Thank you.
Oct 25 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.