Jump to content
  • 0

[request] php expert


tasha

Question

i need little help with my query... i need to select npcs with limit of levels 1-10.. (and no i dont wana use (WHERE level='1' AND level='2' AND level='3' ....etc))

 

$result = mysql_query("SELECT * FROM npc WHERE type='L2Monster' ORDER BY level LIMIT ((level='1'),(level='10'))");

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

SELECT * FROM npc WHERE type='L2Monster' and level between 1 and 10 ORDER BY level DESC

 

This is not related to php at all. It's a simple mysql query.

 

 

More info here: http://www.w3schools.com/Sql/sql_between.asp

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.
Note: Your post will require moderator approval before it will be visible.

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

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock