OOP PROJECT
  • Sqlit3 Installation
  • Database Class
    • টেবিল তৈরী করা
  • Student Information Crud
    • insert student
    • get all student
    • get student(id)
    • Update Student
    • Delete Student
    • Complete Code
Powered by GitBook
On this page
  1. Student Information Crud

get all student

  def get_all_students(self):
   sql = 'SELECT id, name, email, phone FROM students'
   self.db.cursor.execute(sql)    
   return self.db.cursor.fetchall()  

# Create Student Object
student = Student()
allstudent = student.get_all_students()
print(allstudent)

OutPut:

[(1, 'olee', 'olee.techs@gmail.com', '01953-6649667'), (2, 'Tarek', 'tarek@gmail.com', '01900-001122')]

Previousinsert studentNextget student(id)

Last updated 2 years ago