Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Using flask SQLAlchemy and SQLite I have a database for a game. In this game I need to combine 2 elements to make a third. the first element comes from the column Main and the second is the name of a column where, in that row of main, the final element sits. So...

main |  fire | water |  air     | earth
fire |  null | smoke |  inferno | magma


I can't seem to figure out the correct get request call to access the fire row let alone combine it with the water column to get smoke.

What I have tried:

I have tried to use a number of combinations in flask to access it and different browser url combos.
Posted
Updated 22-Aug-22 18:44pm
v2

1 solution

Assuming that main, fire, water, air, and earth are your column names, it's simple:
SQL
SELECT water AS Combination 
FROM MyTable
WHERE Main = 'fire'
 
Share this answer
 
Comments
Member 15744868 24-Aug-22 20:51pm    
This is fantastic, but can you translate it into flask with sqlalchemy and marshmallow???? or better to React.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900