last_insert_rowid() only makes sense for the current connection, so ORDER BY id DESC instead
This commit is contained in:
		
							parent
							
								
									2d8a86950c
								
							
						
					
					
						commit
						eefc41a6d7
					
				| @ -57,7 +57,7 @@ class Pi(Module): | ||||
|                     CREATE VIEW pi_latest_pi AS | ||||
|                         SELECT count_inside, count_total | ||||
|                         FROM pi_log | ||||
|                         WHERE id = last_insert_rowid() | ||||
|                         ORDER BY id DESC | ||||
|                     ''') | ||||
|                 db.execute('INSERT INTO drbotzo_modules VALUES (?,?)', (self.__class__.__name__, 1)) | ||||
|                 db.commit() | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user