From The Mana World
(Outdated database reference) |
(Directly link to the source code for database specification) |
||
Line 1: | Line 1: | ||
== SQL table specifications == | == SQL table specifications == | ||
Since the database is changing relatively often while we're still developing 0.1.0 and nobody likes to keep this page up to date, here is the link to the source code that specifies creation of the database tables. The source code is always right! | |||
* [http://themanaworld.svn.sourceforge.net/viewvc/themanaworld/tmwserv/trunk/src/account-server/dalstoragesql.hpp?view=markup View dalstoragesql.hpp] | |||
* [http://themanaworld.svn.sourceforge.net/viewvc/*checkout*/themanaworld/tmwserv/trunk/src/account-server/dalstoragesql.hpp?revision=4024 Download dalstoragesql.hpp (plain text)] | |||
== | == Example queries == | ||
{{Status_outdated}} | |||
* Count total number of in-game objects | * Count total number of in-game objects | ||
select count(*) from tmw_items; | select count(*) from tmw_items; |
Revision as of 07:47, 22 April 2008
SQL table specifications
Since the database is changing relatively often while we're still developing 0.1.0 and nobody likes to keep this page up to date, here is the link to the source code that specifies creation of the database tables. The source code is always right!
Example queries
- Count total number of in-game objects
select count(*) from tmw_items;
- Count total number of item types
select count(*) from tmw_base_items;
- List player inventory
select distinct tmw_items.id, tmw_items.name from tmw_items, tmw_inventory where tmw_items.id = tmw_inventory.id and tmw_inventory.name = 'nym the great';
- Find weight of player inventory
select sum(tmw_base_items.weight) from tmw_base_items, tmw_items, tmw_inventory where tmw_base_items.name = tmw_items.name and tmw_items.id = tmw_inventory.id and tmw_inventory.name = 'nym the great';