peterisgb Posted March 6, 2013 Share Posted March 6, 2013 Hello, a quick question, How would i be able to credit myself all the items in the game to my inventory quickly? Quote Link to comment Share on other sites More sharing options...
sniko Posted March 6, 2013 Share Posted March 6, 2013 $get = $db->query("SELECT `itmid` FROM `items`"); while( $r = $db->fetch_row($get) ) { item_add(1, $r['itmid'], 1); } echo 'All items credited to userid 1'; Quote Link to comment Share on other sites More sharing options...
peterisgb Posted March 6, 2013 Author Share Posted March 6, 2013 that easy, thanks very much Sniko, nice work. Quote Link to comment Share on other sites More sharing options...
peterisgb Posted March 6, 2013 Author Share Posted March 6, 2013 where do i put this, i tried the staff_items page. at the top it show its been credited to userid1 but its doesnt credit it. Quote Link to comment Share on other sites More sharing options...
Djkanna Posted March 6, 2013 Share Posted March 6, 2013 Could be another possible way, just depends on how quick you want it. INSERT INTO inventory ( inv_itemid, inv_userid, inv_qty ) SELECT itmid,1,1 FROM items; # 1,1 = inv_userid and inv_qty Run it in PHPMyAdmin or alternatives. Quote Link to comment Share on other sites More sharing options...
sniko Posted March 6, 2013 Share Posted March 6, 2013 where do i put this, i tried the staff_items page. at the top it show its been credited to userid1 but its doesnt credit it. I may have got the function and column name wrong. Quote Link to comment Share on other sites More sharing options...
peterisgb Posted March 6, 2013 Author Share Posted March 6, 2013 ty to you both Djkanna, your a star, Sniko, ty for teaching me a little Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.