SQL Help! Please

Discussion in 'MySQL' started by socalbeach, Mar 17, 2007.

  1. #1
    Does any kow how I can resolve this error.

    Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 38
    /home/content/l/i/n/link2work2330/html/classes/mysql_db_engine.php on line 91


    Line 91: return mysql_result(mysql_query($sql,$this->connection),0);
     
    socalbeach, Mar 17, 2007 IP
  2. oziman

    oziman Active Member

    Messages:
    199
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #2
    1. Can we see the whole code?
    2. Is it possible the query is not returning anything?

     
    oziman, Mar 17, 2007 IP
  3. socalbeach

    socalbeach Guest

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Here is the entire error messege:

    Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 38 in /home/content/l/i/n/link2work2330/html/classes/mysql_db_engine.php on line 91

    Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/content/l/i/n/link2work2330/html/classes/mysql_db_engine.php on line 91

    Here is the code:

    * mysql_rows_affected
    */
    function rows_affected() {
    return mysql_rows_affected();
    }

    /**
    *
    *
    */
    function fetch_array($resource) {
    $res = mysql_fetch_array($resource,MYSQL_ASSOC);
    return $res;
    }

    /*
    *
    * get single value from select
    */
    function get_scalar($sql) {
    return mysql_result(mysql_query($sql,$this->connection),0);
    }

    /**
    * Enter description here...
    *
    * @param mysqli result $result
    * @return int
    */
    function num_rows($result) {
    return mysql_num_rows($result);
    }

    /**
    * Enter description here...
    *
    * @param mysql result $result
    * @param int $row_number
    * @return int
    */
    function data_seek($result,$row_number) {
    return mysql_data_seek($result,$row_number);
    }

    function affected_rows() {
    return mysql_affected_rows($this->connection);
    }

    /**
    *
    * close database connection
    */
    function close() {
    return mysql_close();
    }


    This is more of the code, it actually 164 lines long.
     
    socalbeach, Mar 17, 2007 IP
  4. M2D

    M2D Peon

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    what is the code from lines 88,89,90,91,92
     
    M2D, Mar 20, 2007 IP