Reputation
1,047
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
1 7 10
Newest
 Organizer
Impact
~73k people reached

  • 0 posts edited
  • 6 helpful flags
  • 46 votes cast
May
1
comment No INDEX variation seems to speed up the query
Show the DB schema, example data, and the desired result.
Apr
27
comment SQLite text columns
What do you mean with "defer"?
Apr
11
comment Recover data from a corrupted, encrypted SQLite database file
Try to use the backup API to copy the DB into an unencrypted file.
Apr
11
comment Recover data from a corrupted, encrypted SQLite database file
Do you know the password?
Apr
10
comment How to maintain trees and their roots in SQLite
You are talking about inserting, but it is not possible to change any root this way.
Apr
9
comment How to maintain trees and their roots in SQLite
Please UPDATE your question.
Apr
1
comment Trigger with multiple inserts based on JSON data
I'm not really sure whether the original object could be transformed in a similar way.
Mar
29
comment Trigger with multiple inserts based on JSON data
As far as I can see, doing this in SQL would require a recursive CTE, which is not allowed in a trigger.
Mar
8
comment Two queries run much longer when combined into one
An union would be written with UNION (ALL), and that might be what you actually want …
Feb
27
comment Is this user-storage database system efficient, effective and secure?
PHP 5.2 is over five years out of date. You can get unpredictable random numbers with random_int(), random_bytes(), or openssl_random_pseudo_bytes(). If some evil hacker can read your database, he can just send all users an e-mail that some evil hacker broke into your database, and that they should change their password at www.hackerz.ru/change-password.php. But it's more likely that a hacker would just replace your login page.
Feb
26
comment Is this user-storage database system efficient, effective and secure?
The crypt documentation suggests not to use it. rand must not be used for crypthographic purposes (not for the ID, and especially not for the salt). And SQLite 2.8.17 is over ten years out of date. And finally, the term "security" makes sense only if you know what you want to defend against.
Feb
26
comment Is this user-storage database system efficient, effective and secure?
SQLite version 2 ?!? And when you do not even do what the documentation suggests, this project is doomed.
Feb
16
comment SQLite3 foreign key mismatch
Sorry, reversed. Is the relation 1:N or N:1?
Feb
16
comment SQLite3 foreign key mismatch
BTW, are you sure that the foreign key constraint shouldn't be reserved?
Feb
14
comment how to directly import a csv gzip'ed file into SQlite 3?
Oh well. echo ... | sqlite3 ... would work, but then you'd need to get the import file from a fifo.
Feb
8
comment how to directly import a csv gzip'ed file into SQlite 3?
$(echo -e 'line1\nline2')
Nov
26
comment Is it possible to store and query JSON in SQLite?
Read the documentation.
Nov
19
comment Switching SQLite environments
SQLite Manager's "Copy Database" does not appear to work with in-memory databases. Looks like a bug.
Nov
19
comment Switching SQLite environments
Then why are you using an in-memory database in the first place?
Nov
17
comment force SQLite view column type affinity
In SQLite, a view's columns do not have types. The values themselves have types, and there can be different types in the same column.