@zanderwar time for refactoring or at least some calesthenics?
the person who wrote this, didn't use any framework or anything just all raw mysqli_* queries, and he's created this massive PDF by referencing row fields by their integer key (0,1,2,3,4 etc) except the table has been modified massively, so some keys that the script references don't even exist anymore.
like, some comments at least please fam, respect your future developers
right now, i, nor them have nfi what
29 used to once represent
or write code that's self explanatory... good variable names, short functions...
Not just unclear, also a massive anti-pattern. This could easily be solved with a static array and a single selector, instead of 3 if statements
I write SOLID (the principles) codes. People who write big procedural methods (like in that image) actually complains that my classes are too small and too many.
but it takse some time to understand SOLID
Right. I did start to write SOLID "some time" in the past. I thought I had to start "some time". 😛