Jump to content

Resource ID #14


DeathStar

Recommended Posts

HI i have a script and its not giveing an mysq_error()

but this

Resource ID #14

 

HEre is my sql part:

$gunfor=mysql_query("SELECT inv_itemid FROM inventory WHERE inv_userid=$userid", $c) or die("Error: gunfor");
$gunfor2=mysql_fetch_array($gunfor, $c);
$sm=mysql_query("SELECT * FROM items WHERE itmid={$gunfor2['inv_itemid']} && itmtype=4 ORDER BY itmname ASC", $c) or die("Error: sm");

if (!$_GET['action']) {
while($r=mysql_fetch_array($sm) or die("$sm"))
{
echo "<tr><td>{$r['itmname']}</td><td><a href='?action=buy&gun={$r['itmid']}</td></tr>";
}
echo "</table>";

 

The $c call a global that is the connection to database

Link to comment
https://forums.phpfreaks.com/topic/46774-resource-id-14/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.