the error is being returned by the other script that is being included into
the same page .. but its the code below that is causing the other to give
the error, and i cannot figure out why.

----- Original Message -----
From: "Marek Kilimajer" <[EMAIL PROTECTED]>


| I can't see mysql_fetch_row() function anywhere in your code.
|
| Sebastian wrote:
|
| >i have two scripts included into one page, one of them i have been
running
| >for a long time .. i recently made another script and when i include it
into
| >the same page the other script returns this error:
| >
| >Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
| >resource in /home/public_html/file.php on line 59
| >
| >This is part of the sql query that conflicts with the other, any ideas?
it
| >only happens when this snippet is included in the same page that the
other
| >is included into.
| >
| >function load() {
| >
| >  mysql_connect($hostname,$username,$password) or die ( "Could not connet
to
| >MySQL" );
| >  mysql_select_db($database) or die ( "Could not connect to database" );
| >
| > // Delete
| > $sql = "DELETE FROM $table WHERE time < " . (time()-$duration);
| >        $result = @mysql_query($sql) or die ("Error:" . mysql_error() );
| >
| >    // Insert
| >    $sql = "INSERT INTO $table (time) VALUES (" . time() . ") ";
| >
| >        $result = @mysql_query($sql) or die ("Error:" . mysql_error() );
| > // Get count
| >
| > $sql = "SELECT time FROM $table";
| >
| >        $result = @mysql_query($sql) or die ("Error:" . mysql_error() );
| >
| >        return mysql_num_rows ($result);
| >
| >}
| >
| >
| >
| >
| >TIA.
| >
| >
| >
|


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to