mirror of
https://github.com/KUlishevgeniy/c22712.git
synced 2026-09-24 08:00:22 +00:00
Джанго проект
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import psycopg2
|
||||
|
||||
def getcont2():
|
||||
connection = psycopg2.connect(host='localhost', dbname='dbdata', user='postgres', password='Q1w2e3r4')
|
||||
cursor = connection.cursor()
|
||||
cursor.execute("SELECT product, price, diagonal, resolution, cpu, ram, graphics_controller, volume, src FROM laptops")
|
||||
fetched = cursor.fetchall()
|
||||
return fetched
|
||||
cursor.close()
|
||||
connection.close()
|
||||
print(getcont2())
|
||||
Reference in New Issue
Block a user