Jump to content
  • 0

query please :3


Z e r o

Question


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  97
  • Reputation:   0
  • Joined:  02/11/13
  • Last Seen:  

query to find all character that has item item im looking for XD cant find the table for the equipped items XD

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

SQL :

 

Execute this on your database :

SELECT CONCAT(`char`.`name`, " has item ", `inventory`.`nameid`) "Character Name" FROM `inventory` JOIN
`char` ON `inventory`.`char_id` = `char`.`char_id` WHERE `inventory`.`nameid` = '2301';

Change 2301 to whatever item id you wishes to look for. Note also that this is only for inventory. Storage, auction, mail etc. is a different story.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  97
  • Reputation:   0
  • Joined:  02/11/13
  • Last Seen:  

ill try it thanks :)



by the way im looking for cards :o i got no result

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

something like this ?

http://upaste.me/r/54d5fb

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

ill try it thanks :)

by the way im looking for cards :o i got no result

Change nameid to card id? /hmm If you got no result meaning characters doesn't have those items

 

Here is a screenshot of mine doing the query :

Untitled.png

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

@Patskie

perhap he refer to the card that compounded into the equipments..

in that case you have to check for these column

card0
card1
card2
card3

or maybe within other location like

storage
guild storage
cart
mail
etc

 

@Zero

be specify ~give more details..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  15
  • Reputation:   3
  • Joined:  09/11/13
  • Last Seen:  

@Emistry

But when you are doing that be careful to put everything in one query. Looping through 4 queries for "n"-times will kill your server pretty fast when you got a bigger playerbase

Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

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