Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
Clinique Veterinaire
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TD_NF17_goupe4
Clinique Veterinaire
Commits
2f4144af
Commit
2f4144af
authored
Jun 17, 2019
by
Evenson Jeunesse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
6d0a7061
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
98 additions
and
0 deletions
+98
-0
Projet/prog.py
Projet/prog.py
+98
-0
No files found.
Projet/prog.py
0 → 100644
View file @
2f4144af
#!/usr/bin/python3
fddfs
# http://initd.org/psycopg/docs/usage.html
import
psycopg2
HOST
=
"localhost"
USER
=
"me"
PASSWORD
=
"secret"
DATABASE
=
"mydb"
# Open connection
conn
=
psycopg2
.
connect
(
"host=%s dbname=%s user=%s password=%s"
%
(
HOST
,
DATABASE
,
USER
,
PASSWORD
))
# Open a cursor to send SQL commands
cur
=
conn
.
cursor
()
# Execute a SQL SELECT command
sql
=
"SELECT * FROM t"
cur
.
execute
(
sql
)
# Fetch data line by line
raw
=
cur
.
fetchone
()
while
raw
:
print
(
raw
[
0
])
print
(
raw
[
1
])
raw
=
cur
.
fetchone
()
//////////
BOUCLE
PRINCIPALE
/////////////////
# Close connection
conn
.
close
()
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
BASIC
FUCNTIONS
SECTION
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
def
insertClass
(
nom
)
def
insertEspece
(
nom
,
class_id
)
def
insertClient
(
nom
,
prenom
,
dateNaissance
,
adresse
,
telephone
)
def
insertPersonnel
(
nom
,
prenom
,
dateNaissance
,
adresse
,
telephone
,
specialite
,
role
)
def
insertAnimal
(
nom
,
dernierPoids
,
dernierTaille
,
dateNaissance
,
espece
)
def
insertProprietaire
(
client_id
,
animal_id
)
def
insertMedicament
(
nomMolecule
,
effets
)
def
insertAutorise
(
medicament_id
,
espece_id
)
def
insertTraitement
(
nom
,
debut
,
duree
,
veterinaire_id
,
animal_id
)
def
insertPrescription
(
traitement_id
,
medicament_id
,
quantite
)
def
insertAnimal
(
name
)
def
updateClass
(
nom
)
def
updateEspece
(
nom
,
class_id
)
def
updateClient
(
nom
,
prenom
,
dateNaissance
,
adresse
,
telephone
)
def
updatePersonnel
(
nom
,
prenom
,
dateNaissance
,
adresse
,
telephone
,
specialite
,
role
)
def
updateAnimal
(
nom
,
dernierPoids
,
dernierTaille
,
dateNaissance
,
espece
)
def
updateProprietaire
(
client_id
,
animal_id
)
def
updateMedicament
(
nomMolecule
,
effets
)
def
updateAutorise
(
medicament_id
,
espece_id
)
def
updateTraitement
(
nom
,
debut
,
duree
,
veterinaire_id
,
animal_id
)
def
updatePrescription
(
traitement_id
,
medicament_id
,
quantite
)
def
updateAnimal
(
name
)
def
deleteEspece
(
id
)
def
deleteClient
(
id
)
def
deletePersonnel
(
id
)
def
deleteAnimal
(
id
)
def
deleteProprietaire
(
id
)
def
deleteMedicament
(
id
)
def
deleteAutorise
(
id
)
def
deleteTraitement
(
nom
,
debut
,
duree
,
veterinaire_id
,
animal_id
)
def
deletePrescription
(
traitement_id
,
medicament_id
,
quantite
)
def
deleteAnimal
(
name
)
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
CONTROLLER
FUCNTIONS
SECTION
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
def
afficherStatistiques
()
def
modifierTables
(
table
)
def
afficherTables
(
table
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment