Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COYes, i understand that philosphy.. i'm not sure if you're commenting in general or is there anything specifically related to my code(for ex. are you asking me to encapsulate the existing sql/queries in my code into a data class or asking me to write a new data class from scratch)?
      singulars
    2. CODon't overdo it... That is - do not trash something that could be used well - for example, you could take a code, used many times in your whole project, put that into a function in class (don't change it yet), and replace every instance of the original code with a call to the class' method. Then you can do a change in the class method, and it won't require you to do that everywhere. Also, be careful about which code to keep, which not. A situation where you have a code packed on VERY old code, and all is working just BARELY can happen quite often.
      singulars
    3. COYes I have looked at your code. It looks a lot like code I had for my own website. I rewrote that code into basically 4 different layers. 1. Database class that could execute parameterized queries and return the results into a 2-dimensional array, 2. Query class that encapsules website-specific queries (uses database class). 3. A template class that takes data and put in into templates (template = dumb php that just outputs variables and html) and 4. Classes that contain the logic to put it all together. Now that is just a hobby website, but it might suffice for you too.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload