# Resource id #2

**URL:** <https://forum.kirupa.com/t/resource-id-2/115720>\
**Category:** Uncategorized\
**Created:** [July 11, 2004, 6:03am UTC](https://forum.kirupa.com/t/resource-id-2/115720 "2004-07-11T06:03:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Berone](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Berone](https://forum.kirupa.com/u/Berone)\
**Post date:** [July 11, 2004, 6:03am UTC](https://forum.kirupa.com/t/resource-id-2/115720/1 "2004-07-11T06:03:20Z")

</div>

$asdf = “select cash from usergame where user\_name = ‘$HTTP\_SESSION\_VARS[user\_name]’” or die(mysql\_error());  
$asdf\_res = mysql\_query($asdf) or die(mysql\_error());  
srand ((float) microtime() \* 10000000);  
while ($cats = mysql\_fetch\_array($asdf\_res)) {  
$cash = $cats[‘cash’];

When i try and select cash … cash =0 when it should = something else  
I know it finds the row because i put print $cash in that while statement and it prints as 0  
Resource id #2  
i get that stupid error and i donno why i think thats whats causing cash to not = what it should… help me out eh?
