#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    24
    Rep Power
    0

    Cool Code returning "Resource id #2" - But cannot see!


    Hi there,

    Haven't posted in a while - however, I'm building a CMS, and am having some trouble with this code.
    It worked on my test server...but not on the clients actual server.

    PHP Code:
        global $TestDBConnection$DBHost$DBUser$DBPassword$DBName$salt$Table_1$Table_2$Table_3;
    $DBHost "localhost";
    $DBUser "click";
    $DBPassword "password";
    $DBName "click";
    $salt=sha1("goeshere");    
    $Table_2 "click_notices";
    $Link mysql_connect($DBHost,$DBUser,$DBPassword);
    $Query "SELECT * FROM $Table_2 ORDER BY id DESC LIMIT 0,1"
    $Result mysql_query ($Query$Link);
        if(
    $Result === FALSE) {
            die(
    mysql_error());            }
    $QueryValues=mysql_fetch_array($Result); 
    I have error tested using echo's and it runs the $Query row...but nothing after this.
    Tried adding the query and the mysql_connect into the mysql_query parameters, however, there is still an error.

    If anyone could point me in the right direction i'd be grateful.
  2. #2
  3. Come play with me!
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,742
    Rep Power
    9397
    Not sure what you're saying. What's the value of $QueryValues?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    24
    Rep Power
    0
    Originally Posted by requinix
    Not sure what you're saying. What's the value of $QueryValues?
    Hi - Sorry!

    Solved this issue now, the reason was, I was using code that was outdated and the server was requiring a newer version, therefore, produced error messages.

    Comments on this post

    • Jacques1 disagrees : Please don't close your threads. There are still a lot of issues with your code, but since the thread is closed, we cannot reply.

IMN logo majestic logo threadwatch logo seochat tools logo