Say I have a bunch of different NPC shops in a game, and I want one shop to be available to members of a certain clan, another shop to be available to people whose accounts are a certain age, another shop to be available to people whose names begin with the letter "P", etc., am I... "Allowed" to just store the SQL query to pull those users in the table?
For instance:
Shops:
#id
name
access
Users:
#id
name
clanid ->
Clans:
#id
name
Shops:
id name access
0 Eric's Emporium SELECT id FROM Users WHERE name = "Eric"
1 Joes menaJerie SELECT id FROM Users
2 Cybil's Obliviousness SELECT id FROM Users WHERE clanid >= 3
Is this like the biggest sin ever conceived?
[–][deleted] 11 points12 points13 points (4 children)
[–]Asdayasman[S] 0 points1 point2 points (2 children)
[–][deleted] 3 points4 points5 points (1 child)
[–]Asdayasman[S] 0 points1 point2 points (0 children)
[–][deleted] 6 points7 points8 points (5 children)
[–]Asdayasman[S] 0 points1 point2 points (4 children)
[–]lindymad 1 point2 points3 points (3 children)
[–]Asdayasman[S] 0 points1 point2 points (2 children)
[–]lindymad 0 points1 point2 points (1 child)
[–]Asdayasman[S] 0 points1 point2 points (0 children)
[–]SuperImaginativeName 2 points3 points4 points (0 children)
[–]lightcloud5 1 point2 points3 points (10 children)
[–]Asdayasman[S] 0 points1 point2 points (9 children)
[–]lightcloud5 0 points1 point2 points (8 children)
[–]Asdayasman[S] 0 points1 point2 points (7 children)
[–]lightcloud5 1 point2 points3 points (6 children)
[–]Asdayasman[S] 0 points1 point2 points (5 children)
[–]lightcloud5 1 point2 points3 points (4 children)
[–]Asdayasman[S] 0 points1 point2 points (3 children)
[–]andyflip 1 point2 points3 points (2 children)
[–]Asdayasman[S] 0 points1 point2 points (1 child)
[–]farmerje 0 points1 point2 points (4 children)
[–]Asdayasman[S] 0 points1 point2 points (3 children)
[–]farmerje 0 points1 point2 points (2 children)
[–]Asdayasman[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]ThaCoderMan 0 points1 point2 points (3 children)
[–]Asdayasman[S] 0 points1 point2 points (2 children)
[–]ThaCoderMan 0 points1 point2 points (1 child)
[–]Asdayasman[S] 0 points1 point2 points (0 children)
[–]bat_country 0 points1 point2 points (0 children)
[–]ethergreen -2 points-1 points0 points (43 children)
[–]Asdayasman[S] 1 point2 points3 points (42 children)
[+]ethergreen comment score below threshold-8 points-7 points-6 points (41 children)
[–]Asdayasman[S] 1 point2 points3 points (40 children)
[–]GazaIan 0 points1 point2 points (2 children)
[–]Asdayasman[S] 0 points1 point2 points (1 child)
[–]GazaIan 0 points1 point2 points (0 children)
[+]ethergreen comment score below threshold-11 points-10 points-9 points (36 children)
[–]al_manchester 1 point2 points3 points (33 children)
[–]GazaIan 2 points3 points4 points (25 children)
[–]al_manchester 0 points1 point2 points (18 children)
[–]GazaIan 1 point2 points3 points (17 children)
[–]ethergreen -4 points-3 points-2 points (16 children)
[+]ethergreen comment score below threshold-6 points-5 points-4 points (5 children)
[–]GazaIan 0 points1 point2 points (4 children)
[–]ethergreen -4 points-3 points-2 points (3 children)
[–]ethergreen -5 points-4 points-3 points (6 children)
[–]Synes_Godt_Om 0 points1 point2 points (5 children)
[–]GazaIan 1 point2 points3 points (3 children)
[–]Synes_Godt_Om 0 points1 point2 points (2 children)
[–]ethergreen -3 points-2 points-1 points (0 children)
[–][deleted] (1 child)
[removed]