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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Angahran
    New Member
    • Dec 2007
    • 5

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

    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_I NC', true);
    $eqdkp_root_pat h = '../';
    include_once($e qdkp_root_path . 'common.php');

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

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

    ?>[/PHP]
    Last edited by Atli; Oct 25 '08, 03:48 PM. Reason: Added [code] tags.
  • JDBurnZ
    New Member
    • Oct 2008
    • 3

    #2
    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?

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      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 &#91;code] tags when posting your code examples. (See How to ask a question)

      &#91;code=ph p] ...PHP code goes here... &#91;/code]

      Thank you.

      Comment

      Working...