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

  • 0 posts edited
  • 6 helpful flags
  • 45 votes cast
2d
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
answered How to maintain trees and their roots in SQLite
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.
Apr
1
answered Trigger with multiple inserts based on JSON data
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
answered Update function to enter random/unique GUID per row
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
16
answered SQLite3 foreign key mismatch
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
11
answered Can sqlite dump database schema in a fixed order?
Feb
8
comment how to directly import a csv gzip'ed file into SQlite 3?
$(echo -e 'line1\nline2')