+ Reply to Thread
Results 1 to 5 of 5

Thread: PHP Error

  1. #1
    Mrgames05 is offline x10Hosting Member Mrgames05 is an unknown quantity at this point
    Join Date
    Nov 2007
    Posts
    9

    PHP Error

    I currently have the PHP level of 2 as my php (in my account)

    I receive this error when it ry to go to my website:

    Code:
    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mrgames/public_html/projectext/ext/includes/globals.php on line 6
    Here is the source code of my globals.php:

    PHP Code:
    <?php
    //in debug mode or not?
    $query 'SELECT * FROM ext_general';
    $command mysql_query ($query);
    $result mysql_fetch_array ($command);
     or die (
    $db_error);
    $debug $result['debug'];
    if (
    $debug == 1)
    {
     
    $debug true;
    }
    else
    {
     
    $debug false
    }
    //Message shown in register.php
    $register_message "Welcome to Project Extension. Project Extension is currently still under development of iQuest Studios";
    //DB Error message
    $db_error mysql_error();
    ?>
    Any suggestions?


    (ps... wasn't sure if this was the right section. If not, sorry)
    Last edited by Mrgames05; 11-27-2007 at 04:10 PM.

  2. #2
    panop is offline x10Hosting Member panop is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    64

    Re: PHP Error

    What the error message is telling you is that "mysql_fetch_array" is not a valid function. The rest of the code says that if the code fails, that error message is displayed.

  3. #3
    Livewire's Avatar
    Livewire is offline Abuse Compliance Officer Livewire is a glorious beacon of lightLivewire is a glorious beacon of light
    Join Date
    Jun 2005
    Location
    Behind a keyboard.
    Posts
    8,998

    Re: PHP Error

    Quote Originally Posted by panop View Post
    What the error message is telling you is that "mysql_fetch_array" is not a valid function. The rest of the code says that if the code fails, that error message is displayed.
    Actually you're highly mistaken.

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
    What that error message is saying is the argument passed to mysql_fetch_array is NOT a valid result set returned by mysql_query(<yourqueryhere>).

    If the function didn't exist, you'd get something like Error: Call to undefined function mysql_fetch_array() in <path> <filename> line <#>.

    That is caused by the query being poorly formatted. Now since the query is so small, it leads to two possibilities:

    1) Did you log in and select the proper database with the appropriate mysql commands, cause I don't see anything like that there if you did.

    2) Is there even a table named ext_general?


    Also brings about a third question:

    Why is this in Pre-Signup questions if you've already got an account?
    Last edited by Livewire; 11-27-2007 at 08:01 PM.


    TOS breakers will be suspended regardless of race, creed, national origin, hair color, or favorite food. Thanks for your understanding!

  4. #4
    kajasweb's Avatar
    kajasweb is offline Lord Of The Keys kajasweb is an unknown quantity at this point
    Join Date
    Aug 2007
    Location
    Chennai, India
    Posts
    1,722

    Re: PHP Error

    You are missing the semi-color (;) at the end of your query.

    Change
    $query = 'SELECT * FROM ext_general';
    to
    $query = 'SELECT * FROM ext_general;';
    R. Kaja Mohideen
    Start Your Own Blog... Start Making Money...
    http://www.MyiStop.com/
    CuteCom.Net - Low Cost International Internet Telephony (VoIP) Service

  5. #5
    Russ's Avatar
    Russ is offline Retired ***** Russ is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    3,162

    Re: PHP Error

    In the future, this is not the appropriate forum for this type of post. Please be sure to post in the right place next time.
    x10 Chat is now available! Live Support!

    DO NOT PRIVATE MESSAGE STAFF - WE ARE BUSY

+ Reply to Thread

Similar Threads

  1. Unstand PHP?
    By o0slowpaul0o in forum Tutorials
    Replies: 8
    Last Post: 01-07-2008, 09:16 PM
  2. require_once Error (PHP)
    By Jarryd in forum Free Hosting
    Replies: 3
    Last Post: 11-23-2007, 10:50 AM
  3. 500 Internal Server Error (PHP Error?)
    By aniklaus in forum Free Hosting
    Replies: 3
    Last Post: 11-12-2007, 11:47 AM
  4. Sigo con problemas con phpbb2
    By reciecho in forum Soporte
    Replies: 7
    Last Post: 10-20-2007, 06:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers