Menu
i have this code and it it keeps saying this error
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
[code=php]<?php
include(“rankdb.php”);
$query = mysql_query(“SELECT * FROM `users`”) or die(mysql_error());
while($row = mysql_fetch_array($query))
{
$points = 0;
$points += $row[‘wall’] * 50 + $row[‘lab’] * 80 + $row[‘image’] * 2000 + $row[‘units’] * -500;
$query = “UPDATE `users` SET `score` = ‘$points’ WHERE `username` = ‘” . $row[‘username’] . “‘;”;
$result = mysql_query($query);
}
?>