# need some help

**URL:** <https://www.phphelp.com/t/need-some-help/11386>\
**Category:** MySQL database\
**Created:** [August 12, 2008, 8:26pm UTC](https://www.phphelp.com/t/need-some-help/11386 "2008-08-12T20:26:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kpjuni](https://www.phphelp.com/letter_avatar_proxy/v4/letter/k/71e660/32.png) [@kpjuni](https://www.phphelp.com/u/kpjuni)\
**Post date:** [August 12, 2008, 8:26pm UTC](https://www.phphelp.com/t/need-some-help/11386/1 "2008-08-12T20:26:03Z")

</div>

$weapon1=(int)$youdata[‘equip\_primary’]; // weapon 1 ID number — this is returning correct  
$weapon2=(int)$youdata[‘equip\_secondary’]; // weapon 2 ID number — this is returning correct  
$armor=(int)$youdata[‘equip\_armor’]; // armor ID number — this is returning correct — only not needed at the moment  
$wp1dmg=(int)mysql\_query(“SELECT weapon FROM items WHERE itmid=$weapon1”); // should be weapon damage — this is returning resource id#  
$wp2dmg=(int)mysql\_query(“SELECT weapon FROM items WHERE itmid=$weapon2”); // should be weapon 2 damage — this is returning resource id#

the comments say it all. if i could get live chat with someone, that would be great too… yahoo id=steven\_littrell

---

<div class="post-metadata">

**Author:** ![Zyppora](https://www.phphelp.com/letter_avatar_proxy/v4/letter/z/76d3ee/32.png) [@Zyppora](https://www.phphelp.com/u/Zyppora)\
**Post date:** [August 15, 2008, 8:05am UTC](https://www.phphelp.com/t/need-some-help/11386/2 "2008-08-15T08:05:41Z")

</div>

mysql\_query() functions return result resources. You’re going to need to use mysql\_fetch\_array() to get the actual values out of the resources.
