51

This is not a joke ...

Comments
  • 22
    Haha wow, that's pretty wild!
  • 8
    Dafuq did I just read?
  • 13
    Idk who wrote it, but Im already scared of the Dev.
  • 12
    You'll never need to fire a JOIN again if you just pull the entire database in?
  • 7
  • 6
    tag 1970 and PHP 🤔
  • 3
    That SQL query is missing a LIMIT.

    I wouldn't want to touch it though.
    😬
  • 2
    Are the variables 'prefixed' with their data type? String(SqlSelct), Object(Mysql)?

    Oh btw this is nothing compared to what I have to deal with every now and then, I would rant about it, but the start of the select and it's end is too long to get into one screenshot. Plus atleast this is one string.
    But still I feel your pain.
  • 3
    @kaqqao yes, it is
  • 3
    The problem is you don't do that today. The "dev" is a little bit retard and we deal with his sh*t ...

    That's a little exemple of his work.
  • 6
    @SatanicGeek

    I wouldn't ever see query length as a problem, as long as there is a good reason. Databases of complex products can require complex queries.

    The main problem here in my opinion is that even with SQL, your goal should be to write self-documenting code which slices out the data you need with surgical precision. Column and table aliases should provide some clarity, and carefully putting constraints on the result set is important to limit network traffic.
  • 2
    @bittersweet That's the problem. No comments and we can not understand what this query will do.
    I use PDO and it's much clear for me. My coworker don't know all this new technology and don't want to use PHP 5.6> because MySQL is deprecated.
  • 1
    @SatanicGeek: That is a problem... The 5.x versions are not officially supported anymore. And PHP7 is so much faster and cleaner!

    And with ORMs (query libraries) like Capsule/Eloquent, Propel and Doctrine, it's very simple to write complex, correct and injection-safe queries through PDO.
  • 1
  • 1
    @kaqqao because of this, I had a big stroke when I was debuging the code
  • 0
    @SatanicGeek Tg mdr Moi je te baise en PDO. Juste une question de logique que tu vas pas changer ça lors d'une séparation complète de l'intranet boloss.
  • 0
    @P4R4DiSi4C J'en ai parlé avec Jean, ça sera fait si Harmonie tombe pas assez vite.
  • 0
    @P4R4DiSi4C Rappelle toi qu'on avait un projet de mettre à jour en PHP 7
  • 0
    @SatanicGeek Bah ouais mais APRÈS avoir un intranet fonctionnel
  • 0
    @P4R4DiSi4C Mais tu capte pas quoi quand je te dis que ça sera des améliorations qui font parti du projet et Que c'est des todo d'après mise en place
  • 0
    @SatanicGeek Bah c'est correct ce que tu viens te dire et on va le faire. C'est juste que ça va a l'encontre de ton commentaire plus haut "My co-worker doesn't know new technologies..." etcetc
  • 0
    @P4R4DiSi4C Bah Jean n'y connaît rien et n'est pas ouvert à ça. Hugo par contre nous fera confiance pour faire ça
  • 0
    @P4R4DiSi4C Je viens de voir. Je parlais pas de toi. Je parlais de Eddy et Gaspard et ceux avant qui ont pas voulu faire l'update de PHP
  • 0
    @SatanicGeek Ah ouais... Mais surtout ceux qui on utiliser mysql et même pas mysqli pour le tout en php 5.4. PDO ça va faire du bien
  • 1
    *two weeks of writing later....*
    *finally five years of executing later..............*
Add Comment