![]() |
Pragma foreign keys = ON;?
Is the use of "on delete" enabled in sqlite?
|
Hello?(echo)
So what i am asking is can we create triggers, and use foreign keys in our schema for tables. This would be a great benefit and if we can, how do we go about setting it up. aka pragma foreign_keys =ON; |
BUMP
Can anyone help me with this? |
I am trying to get sqlite foreign key functionality working on my server. Basically i have a bunch of tables with some id as a primary key, and i am referencing them in another table, with the rules on delete cascade and on update cascade. However when i make the query the rules do not work. Im not sure how requestsql function is being abstracted but usually you can just do query ("pragma foreign_keys=1"); query("delete blah blah") query.commit. That does not work, and id like some insight.
|
Our version of SQLite is out of date so just write your own DELETE queries.
http://sqlite.org/foreignkeys.html This document describes the support for SQL foreign key constraints introduced in SQLite version 3.6.19. > temp.res = SQL.executeSQL("select sqlite_version() AS sqliteversion", true); > echo(temp.res.rows[0].sqliteversion); echos 3.6.12 |
|
Quote:
|
All times are GMT +2. The time now is 05:08 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.