It is an example of using a doctrine with php via a terminal command and sqlite, in a student registration with a telephone relationship and courses linked to it. Using queries via dql, and also repository
composer install
This this section explains how to use the command line with php execution.
- New student registration
php bin/{dql or repository}/student-insert.php '{name}'
- New student registration with phones
php bin/{dql or repository}/student-insert.php '{name}' '{phone1}' '{phone2}' ...
- New course registration
php bin/{dql or repository}/course-insert.php
- List of registered students information
php bin/{dql or repository}/student-list.php
- List of registered courses
php bin/{dql or repository}/course-list.php
- Relationship with student and course
php bin/{dql or repository}/student-enroll.php '{studentId}' '{corseId}'
- Number of registered students
php bin/{dql or repository}/student-count.php
- Search student by name
php bin/{dql or repository}/student-search.php
- Change student name
php bin/{dql or repository}/student-rename.php
- Delete student
php bin/{dql or repository}/student-delete.php