Guys, such a question, I have a table in the database, called product, it contains:
name= 'Product name' calories= 'the number of calories in the food' protein= 'Amount of protein in the food' fats= 'the amount of fat in the food' carbohydrates= 'the amount of carbohydrates in the food'
For example: Name= Rice, Calories= 300, Protein= 10, Fat= 2, Carbohydrates= 70 Name= Buckwheat, Calories= 320, Protein= 16, Fat= 1, Carbohydrates= 65
The user enters Rice and wants to get the value of calories, protein, fat and carbohydrates in Rice, in the database it is under the name Rice, and suddenly the user enters Rice, Rusa or somehow makes a mistake, then nothing will be found in the database. Tell me how you can roughly implement it so that the most similar name is found in the database. I know about a fuzzy comparison of strings, but I don’t know how to associate this with the base, maybe there is a special query in sqlite, but I didn’t find anything
- python : How to check if the database is empty?
- python : How to choose where to save between tables in the database?
- python : Read file from SQLlite database
- How to move values from sqlite table to python list (flask)
- python : How do I validate user input through SQLite?
- python : How to get value from row in SQL DB?
- python : Problem when starting tkinter program when connecting SQL
- python : Jinja2.exceptions.UndefinedError flask
- python : How to restrict access to the execution of commands and Reply on the keyboard?