Skip to content

Tag: sqlite

Dynamic SQL queries with SQLite3

I would like to allow users to query a sql database. The database is here So the user will be able to enter the queries they want: and then the query will execute: If the user enters both variables like city=’SQL City’ and type=’murder’ it works as it finds both values in the same row,…

can’t put variables inside sqlite3 query in flask

Like documentation says, and I tried: it didn’t work, and I tried: also didn’t work. How can I pass variables inside my request? Answer The insertion looks correct. However, until you perform a commit, any DML operation (like an insert) would only be visible from the session that performed it, and…

How to fix a Mac base conda environment when sqlite3 is broken

I recently updated the Python version of my base conda environment from 3.8 to 3.9, using mamba update python=3.9, but I can no longer run IPython, because the sqlite3 package appears to be broken. Since I had another Python 3.9 environment that is still functional, I tried copying over the envs/py39/lib/sqli…

How to reduce size of the database?

I have a folder with more than 150 txt files. To combine the data Resulting file has a size of 320 MB. I create a database and insert combined data: I could not create the database because it is too large. How to reduce size of the database? Answer The problem is not SQLite, it is your import script. SQLite

Django – fresh database and no such table

I’m using my complex jobs app in production and it works fine, with sqlite database. I’m trying to create new database from scratch and I cannot do that nor using migrations nor trying to make them once again: When I’m trying to reuse my migrations: When I’ve tried to remove all migrat…