Questions tagged [SQLite] (497)

1
answer

How to connect to the database — Heroku+PHP+to do so,+Sqlite?

Can't connect to database on local everything is OK. spoilerrequire_once(__DIR__ .'/db/rb-sqlite.php'); R::setup('sqlite:'.__DIR__.'/db/database.sqlite'); ps. Yes, sqlite on heroku.
Stacy83 asked April 19th 20 at 12:43
1
answer

As for sqlite3 to make the right delete rows?

my code is the following: #array_set[0] - gives the desired ID (taken from tk.treeview) - works like a clock self.c.execute("""DELETE FROM table WHERE id = ?; """,array_set[0]) self.tree.delete(self.tree.selection()) self.conn.commit() self.conn.close() The problem is that deleted only if if ID < 10. tobish if the ID f...
winona_Goldner11 asked April 19th 20 at 12:19
1
answer

Telegram. bot. SQlite3 how to display id?

You need that whenever the user clicks the command /start, id have been made in the table if it is not there. At this stage the table is written "built-in function id" and this is done every time(need only if ID not). What to add and what to remove? I would be grateful if the answer will be detailed, with working sqlite for...
Henry_Lemke asked April 19th 20 at 12:07
1
answer

Data output from the database in the telegram-bot?

Hi all. Need help. Here I wrote a simple bot which asks to enter data. Now we need to compare the data entered by the user with the data in sqlite DB (bring if you have). I understand they want to put in variable in "Select" query to compare variable fields of the database. But I can't( not enough knowledge) Sorry if stupid...
benton80 asked April 18th 20 at 13:32
1
answer

How to implement the output data from the database based on the count data?

The user forms a query in the database. On request can get an array of lists, from one to infinity. Depending on the number of lists correctly display information to the user. Example: data = cursor.fetchall() #data - accordingly, we obtain an array, for example - [(1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3)...] With len(...
milton_Hetting asked April 18th 20 at 12:38
1
answer

How to make the merger of the three sqlite tables?

There are 3 tables that have same columns. How to combine these tables into one? But it is worth considering that there is a primary key - id. They need to be drained and, as I understand it, reassign all records new id. Also interested in the possibility of validating the data. For example: Each table has a column name. I...
Brandt_Pollich82 asked April 16th 20 at 10:02
2
answers

To help with the SQL query?

You need from the table Table create a query to get to each store a number of accessories, sold in a single check with flowers For example
Paige81 asked April 9th 20 at 10:46
2
answers

How to make multiple lookup values in a Sqlite query?

Here is an example of turning a single cursor.execute("""INSERT INTO flow_of_funds VALUES (:input_date_and_time, 'RUB', 'crediting funds', '22950')""", {"input_date_and_time": input_date_and_time})
Briana_OReil asked April 9th 20 at 10:45
0
answer

How to implement in this case, the count of dislikes allowed?

There is such a model: [Table("PostsData")] public class PostData { [PrimaryKey,AutoIncrement] public int Id { get; private set; } public string PostUrl { get; set; } public long? PostId { get; set; } public int MessageId { get; set; } public int Likes { get; set; } public int DisLikes { get; set; } public virtual ...
Nigel.Olson asked April 9th 20 at 10:00
1
answer

Insert record in one table if there is an entry in another table?

Good afternoon. There is a table tmp_id-data has two columns (id, data, time_connect). The second table info_table (id-data, data, comment). What you need. You need to insert in the first table tmp_id-data recording only in the case if the table info_table have id_data. If there is no date, nothing to insert. Now I do...
Jaden97 asked April 8th 20 at 18:02