显示警告,提供的参数不是有效的[重复]

This question already has an answer here:

while performing inner join when i add data in mysql it shows a error mysql_fetch_array is not a valid argument. code is below:

    echo $sql="SELECT * FROM info
 INNER JOIN item ON info.info_id=item.info_id where item.info_id=".$info_id;
        $query=mysql_query($sql);
         while($result=mysql_fetch_array($query))
        { 
             echo "<tr>";
             echo "<td>" .$result['Name']. "</td>";
        echo "<td>" .$result['Item']. "</td>";
         echo "<td>" .$result['Price']. "</td>";
        echo "<td>" .$result['info_id']. "</td>";
             echo "<td><a href='item.php?act=edit&id=".$result['id']."'>Edit</a></td>";
             echo "<td><a href='item.php?act=delete&id=".$result['id']."'>Delete</a></td>";
             echo "<td><a href='item.php?act=item&id=".$result['id']."'>Item</a></td>";
echo "</tr>";

while running the above code it shows the following warning:

warning:mysql_fetch_array(): supplied argument is not a valid MySQL result resourc

</div>

The mysql_query method probably fails silently. If it does, it returns FALSE so you should be doing this:

$query=mysql_query($sql);
if (!$query) {
    die('MSSQL error: ' . mssql_get_last_message());
}