Jump to content
MakeWebGames

Recommended Posts

Posted
$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';
Posted

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.

Posted
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.

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...