Sorry if I posted this in the wrong place.
I recently paid for a script. Once I finally received it an uploaded it there was an error the very first time I looked at my webpage. (The wife warned me to not buy it.)
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in/home/content/23/8334523/html/mywebsite.com/inc/valuescript.func.phpon line 571
The page this script shows on is only one page. There is a input box then there are three boxes underneath it. The error code shows in all three.
Box 1 is for most viewed
Box 2 is for recently updated
Box 3 is for new results
If I enter something into the input box I get the same error code as above but it does go to a new page but it is just a white page with no of the items from the original page.
I know very little to nothing about php and a little more about html. I am using web expression as my editor.
Here is the code from area around line 571. Was not sure what to post to give enough info to get some help with this. I also attached a screenshot.
if($type=="MostViewed")
$sql = mysql_query("SELECT * FROM `websites` ORDER BY `TotalViews` DESC LIMIT $max");
if($type=="NewSites")
$sql = mysql_query("SELECT * FROM `websites` WHERE `NewMark`='1' ORDER BY `LastUpdate` DESC LIMIT $max");
while ($row = mysql_fetch_array($sql)) { <This is line 571>
$i++;
$item_array = array(
"%id%",
"%website%",
"%link%"
);
$replace_array = array(
$i,
"www.".$row["Domain"],
$SiteUrl."www.".$row["Domain"]
);
$tmp .= str_replace($item_array, $replace_array, $itemhtml);
}
return $tmp;
}
Thank you for any help I might be able to get with this. Nothing worst then paying for something the it does not work and the seller is not returning any of my emails and the wife is giving me the "I Told You So"....
Stay @ Home Dad