Can SQL npc code pick the highest stat from a table and display it?

SoulForge

Dedicated Member
Dedicated Member
Oct 18, 2004
169
7
64
Im wanting an npc to pick the highest number in a table field and display 1 entry in-game, For Example say i wanted an npc to pull the highest dc of 1 player, has to be highest tho anyway of doing this??
 

Inflikted

LOMCN Veteran
Veteran
Aug 4, 2003
256
7
114
mir3 only has very basic sql querying abilities it doesnt allow you to do lists, limits, order things by asc or desc etc etc. you can write an external php script and set it up on a crontab to move the data to a custom sql table that does whatever query you want, in your case you would want a desc, limit 0, 1. and then set your npc to get that single data point you wanted setup in the custom sql table. the only trouble will be that the data wont be instantaneous, would be 1-2 seconds old, but meh :). but its not too difficult to do.
 
Upvote 0