Jump to content
MakeWebGames

Recommended Posts

Posted

I'm hoping someone can help me with this, I am trying to add a count of items in circulation to the iteminfo page.

This is what I have but it only shows 1 item in circulation.

 

$itemcount=$db->num_rows($q);
$q=$db->fetch_single($db->query("SELECT COUNT(*) FROM inventory WHERE inv_itemid = $itmid"));

 

also tried:

 

$itemcount=$db->num_rows($q);
$q=$db->fetch_single($db->query("SELECT COUNT(*) FROM inventory WHERE inv_itemid = $itemcount"));

 

and:

 

$itemcount=$db->num_rows($q);
$q=$db->query("SELECT inv_qty FROM inventory WHERE inv_itemid = $itmid");

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...