Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

invalid argument

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Put up a XMB forum
phpMyAdmin 2.2.2
MySQL 3.23.45


Get this only when replying to posts.....

Warning: Supplied argument is not a valid MySQL result resource in /home/planetga/public_html/planet_forum/db/mysql.php on line 16

Heres the file:

<?php

class dbstuff {
var $querynum = 0;

function connect($dbhost=&quot;localhost&quot;, $dbuser, $dbpw, $dbname, $pconnect=0) {
if($pconnect) {
mysql_pconnect($dbhost, $dbuser, $dbpw);
} else {
mysql_connect($dbhost, $dbuser, $dbpw);
}
mysql_select_db($dbname);
}

function fetch_array($query) {
$query = mysql_fetch_array($query);
return $query;
}

function query($sql) {
$query = mysql_query($sql) or die(mysql_error());
$this->querynum++;
return $query;
}

function result($query, $row) {
$query = mysql_result($query, $row);
return $query;
}

function num_rows($query) {
$query = mysql_num_rows($query);
return $query;
}

function insert_id() {
$id = mysql_insert_id();
return $id;
}

function fetch_row($query) {
$query = mysql_fetch_row($query);
return $query;
}
}
?>



I dont even know if one could see the problem by just this.....stummped....as I said newbie. Maybe some suggestions?
Forum resides here:
 
Maybe it's just me, but I sure can't tell much by that. What's being passed to the function in question? That's probably where the trouble is -- whatever the function is getting as $query is what's not a valid result resource.

So what's the function getting as $query and where is that value coming from? That should help find what the trouble is. Matt
matt@paperlove.org
If I can help, I will.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top