-
Notifications
You must be signed in to change notification settings - Fork 0
29#-add-check-for-attendant-number #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
| title: title, | ||
| day: day, | ||
| genre: genre, | ||
| name: name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Znam da je od ranije, da nisam video tada, ali ovo mozes prebaciti u jednu niz variablu i nju poslati, pa sa druge strane iscitavati na taj nacin vrednosti.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uradio sam, samo mi nije bas najasnije zasto
| $connection = Drupal::database(); | ||
|
|
||
| $reservationQuery = $connection->query("SELECT `reserved_movie_name`,`day_of_reservation` FROM `reservations`"); | ||
| $reservationQueryResult = $reservationQuery->fetchAll(); | ||
| $decodedReservationQuery = json_decode(json_encode($reservationQueryResult), true); | ||
|
|
||
| $reservedDays = []; | ||
| foreach ($decodedReservationQuery as $key => $value) { | ||
| $reservedDays[$value['reserved_movie_name']][$key] = $value['day_of_reservation']; | ||
| } | ||
|
|
||
| foreach ($reservedDays as $key => $value) { | ||
| $reservedDays[$key] = array_count_values($value); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mora li ovo u sklopu ove funkcije? Ili moze negde odvojeno?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moze kao servis, samo mi neki problem iskakao, bas cu procitati ponovo kako se servisi pisu, vrv sam nesto propustio.
| } | ||
| fclose($fileHandle); | ||
| } else { | ||
| }else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leva strana je kako treba, treba razmak posle zagrade.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatirao mi tako :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nije tako formatirao, nego nisam usopte formatirao taj fajl :)
| $connection = Drupal::database(); | ||
|
|
||
| $getReservations = new GetReservations(); | ||
|
|
||
| $reservations = $getReservations->getReservations(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Razmisli malo, pa mi objasni zasto ovo ne bi trebalo da bude u sklopu content() funckije.
No description provided.