I think, the main reason of why time() function cannot be run that the time() resumes the calculation before and after the execution of code. if I was in mistake? just correct me :)
Instead of writing the database connection in inside the constructor and asking the user to enter those values Why not create a method for the connection and invoke it on the constructor
actually to use your method, you dont need another function. you can make the connection directly in the constructor. its a matter of preference. but doing it that way means i'll have to add database connection values inside the class itself. the problem is my connection values will always be different from anyone else's values that wants to use my class. this means every time i give the class to someone, they must edit the class first, just to get a connection. i dont like that. better i offer them a way to add their values without opening the class. they just include it in their project. in any project, new database values need to be added. that is done only once, whether those values are given inside or outside the class, doesn't matter. so i dont think its a big deal if it only needs to be done once. but like i said, it all depends on what you prefer. any method is fine so long the connection is made
Thanks for your support 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
Always welcome
Great explanation
Where you been 1 year ago when i do start with PHP OOP :D you could save me a lot of time so i could be free and have sleep :D
Thanks making nice video.
You're most welcome😊
keep up and good luck. good chaneel ,kind a person
Thank you very much!☺️
Easy Pesy, Thanks
cool :)
you a goodwill person!!!
Super oops php series...
thank you!
I think, the main reason of why time() function cannot be run that the time() resumes the calculation before and after the execution of code. if I was in mistake? just correct me :)
Hi there! Are you going to do a project with what you have learned?
are you asking if this series will have a project?
Instead of writing the database connection in inside the constructor and asking the user to enter those values
Why not create a method for the connection and invoke it on the constructor
actually to use your method, you dont need another function. you can make the connection directly in the constructor. its a matter of preference.
but doing it that way means i'll have to add database connection values inside the class itself. the problem is my connection values will always be different from anyone else's values that wants to use my class. this means every time i give the class to someone, they must edit the class first, just to get a connection. i dont like that. better i offer them a way to add their values without opening the class. they just include it in their project.
in any project, new database values need to be added. that is done only once, whether those values are given inside or outside the class, doesn't matter. so i dont think its a big deal if it only needs to be done once. but like i said, it all depends on what you prefer. any method is fine so long the connection is made