AD2024 SQL DATA Multiplier

SQL DATA REPRESENT ANOTHER DATA

Imagine i insert a data A into sql table and the same A is query back to html, the same can use decimal , hexadecimal to represent another data. like Emoji code have few table but only require simple A and you can choose to use Hexadecimal and the same A will be a luaghing logo.

So i ask chat gpt what are the types i can use

Types of conversion

I ask chatgpt to give me a list

Conversion Type   JavaScript Function Example   Result 
Character   'a'   'a'  
Unicode (Decimal)   'a'.charCodeAt(0)   97  
Unicode (Hexadecimal)   'a'.charCodeAt(0).toString(16)   61  
Binary  'a'.charCodeAt(0).toString(2)   1100001  
Octal   'a'.charCodeAt(0).toString(8)   141 
HTML Entity   '&#' + 'a'.charCodeAt(0) + ';'   a  
Base64   btoa('a')   YQ==  
Hexadecimal String   'a'.split('').map(c => c.charCodeAt(0).toString(16)).join('')   61 
Decimal String   'a'.split('').map(c => c.charCodeAt(0).toString(10)).join('')   97  
URI Encoded   encodeURIComponent('a')   %61  


And i ask chat gpt to go thru a-z and the values looks different and can be use for other data too.

SQL DATA REPRESENT ANOTHER DATA

since an A can run thru decimal become 97 and hexadecimal into 61 , binary 1100001  even base64 into YQ== so

lets put into different use
  A  =  A
 query out
  A  convert decimal become 97 and 97 can put into img tag  and it will call out image 97.png
 A  convert hexadeciaml become 61 and 61 can put into img tag and it will call out image 61.gif or animated png
 A convert binary become 110001 and 110001 can put into img tag and call out image 110001.png
A convert octal become 141 and 141 can put into img tag call out 141.png o
 like simple 4 different value.

Lets say in a game i chop a tree it will give me A item
 i can switch to decimal and insert into table 97.png
 if i switch into hexa  and it will insert  61.png into table.
 if i switch into binary and it will insert  110001 .png into table.
 if i switch into octal and it will insert  141.png into table.

if i send 'A' into table and store as A,
when i query out i need to choose is it decimal or hexa or binary or octal when i query out , this way the simple A is store in minmum.
if i choose store 97.png it will be large table each item will need more bytes
but if  i put just A how to denote which to choose ?

is it by area when character is at Magic realm all item change to decimal ?
back in human realm it change to A.png ?

what kind of mechanism needed to select or switch ? Area , date time ?, lucky draw ?

Tree Trunk example with date

SO my inventory will inesrt A in the sql table.

After query   A  =  A
 query out

   if Date query from table is < 1 month
  A  convert decimal become 97 and 97 can put into img tag  and it will call out image 97.png  is the tree trunk picture.

  if date query from table is  > 1 month  < 6 months
 A  convert hexadeciaml become 61 and 61 can put into img tag and it will call out image 61.gif or animated png   ,  brown color decay tree trunk

   if date query from table is > 6 months < than 12 months
 A convert binary become 110001 and 110001 can put into img tag and call out image 110001.png    ,  Fugus Brown with green tree trunk

if date  query from table is   > 12months <36months
A convert octal become 141 and 141 can put into img tag call out 141.png  , Rotting tree trunk

so tree trunk can use,  97.png
Brown decay tree trunk also can use  61.png
Fugus Brown growing tree trunk cannot use 11001.png
Rotting tree trunk cannot use must throw alert user throw from inventory 141.png

so my table originally is

date tree rock branches fibre
1/2/2004 1      
         

Now my table  can be like this

Date resources user  
1/2/2004 a x13424  
7/3/2004 a x13424  
1/9/2004 a x13424  

And if query out

Will get A and change to 97 if 1 months
Will get 61 if 7 months
So my inventory out iframe will show 3 different wood.

Following are the availabe non repeative img value

Column1 Hexaldecimal octal Decimal Binary Bota function
[ 5B 133 91 1011011 Ww==
\ 5C 134 92 1011100 XA==
] 5D 135 93 1011101 XQ==
^ 5E 136 94 1011110 Xg==
_ 5F 137 95 1011111 Xw==
a 61 141 97 1100001 YQ==  
b 62 142 98 1100010 Yg==
c 63 143 99 1100011 Yw==
d 64 144 100 1100100 ZA==
e 65 145 101 1100101 ZQ==
f 66 146 102 1100110 Zg==
g 67 147 103 1100111 Zw==
h 68 150 104 1101000 aA==
i 69 151 105 1101001 aQ==
j 6A 152 106 1101010 ag==
k 6B 153 107 1101011 aw==
l 6C 154 108 1101100 bA==
m 6D 155 109 1101101 bQ==
n 6E 156 110 1101110 bg==
o 6F 157 111 1101111 bw==
p 70 160 112 1110000 cA==
q 71 161 113 1110001 cQ==
r 72 162 114 1110010 cg==
s 73 163 115 1110011 cw==
t 74 164 116 1110100 dA==
u 75 165 117 1110101 dQ==
v 76 166 118 1110110 dg==
w 77 167 119 1110111 dw==
x 78 170 120 1111000 eA==
y 79 171 121 1111001 eQ==
z 7A 172 122 1111010 eg==
{ 7B 173 123 1111011 ew==
| 7C 174 124 1111100 fA==
} 7D 175 125 1111101 fQ==
! 21 41 33 100001 IQ==
# 23 43 35 100011 Iw==
$ 24 44 36 100100 JA==
% 25 45 37 100101 JQ==
& 26 46 38 100110 Jg==
( 28 50 40 101000 KA==
* 2A 52 42 101010 Kg==
/ 2F 57 47 101111 Lw==
0 30 60 48 110000 MA==


Lets say a folder put raw and inside i can have 43 raw items, each item can change 4 of itself like a into 97 so i can expire item, change class,

inventory folder user
a raw x1233
a cooked x123
a weapon x123
a Fresh x123
a seed x123
a sapling x123
a metal x123
a smelted x123
a tree x123
a forged x123
     


All the things are store as a -symbol 43 non repetivate,
in this world even if i put tree folder there is more than 43 different types of tree
raw iron and other can list out many ignot,
liquid sapling also have eg. rubber, oilve oil and so on.

and from raw to cooked folder i need to change folder name same a will be represented as cooked food 'a'

instead of sql delete a and insert into cooked table.

the old fashion way is

inventory folder user
a raw x1233
     
Do sql delete entry
do sql insert entry
inventory folder user
a cooked x1233


There is cron job run every hour i heard before or seen before where sql line is move into recycle table and hourly cronjob will delete.

basically game alike
a is raw rock found in river bed there is 4 conversion raw\61.png , raw\97.png , raw\141.png ,raw\1100001,png , raw\YQ== .png
i can do action wething to turn into sharp rock knife type

inventory folder user
a raw x1233

after wething
inventory folder user
a wething x1233

making 4 counts of wething each count change the rock shape and lastly  wething\yq== .png is a knife like effect

inventory folder user
a wethed x1233


a wethed rock knife like can also use 4 conversion until blunt knife maybe like use 10 count convert to 1,2,3,4 lastly wethed\YQ==.png

So a  metal ingot will be ingot\a.png smelted\a.png,  weapon\a.png  sword\a.png 

 

Area effect with weather

The whole area has tree, plants,  imagine if suddenly got snow

After query   A  =  A   = A.png  normal tree
 query out

   if Date query from table is  snow effect
  A  convert decimal become 97 and 97 can put into img tag  and it will call out image 97.png  is the white snow tree

  if date query from table is  autum
 A  convert hexadeciaml become 61 and 61 can put into img tag and it will call out image 61.gif or animated png   tree dropping leaf animation

   if date query from table is sunny day
 A convert binary become 110001 and 110001 can put into img tag and call out image 110001.png    , greenish tree

if date  query from table is  Raining
A convert octal become 141 and 141 can put into img tag call out 141.png  , rain dropping tree effect

so tree trunk can use,  97.png
Brown decay tree trunk also can use  61.png
Fugus Brown growing tree trunk cannot use 11001.png
Rotting tree trunk cannot use must throw alert user throw from inventory 141.png

Clock conversion

The whole area has tree, plants,  imagine if suddenly got snow

windows.time now  doing a script every sec it get the time now and convert into those 4

Tree growing

SO my inventory will inesrt A in the sql table.

After query   A  =  A
 query out  A  convert decimal become 97 and 97 can put into img tag  height px and it  will be 97 px so arrange to big height decimanl has to go down

if Date query from table is < 1 month
A  convert hexadeciaml become 61 and 61 can put into img tag heiht 61 px

 if date query from table is  > 1 month  < 6 months
A  convert decimal become 97 and 97 can put into img tag  height px and it  will be 97 px so

if date query from table is > 6 months < than 12 months
A convert octal become 141 and 141 can put into img tag  height px will be 141 px

if date  query from table is   > 12months <36months
A convert binary become 110001 and 110001 can put into img tag and call out image 110001.png    too big cannot use

Simple

AFte
  • 12