Category: ServerSide / backend

MySQL search replace update where sql query

yes, it is NOT the most convenient, query you could imagine. UPDATE `table_name` SET `column_name` = REPLACE(`column_name`, ‘replace_this’, ‘with_this’) WHERE `column_name` LIKE ‘%with_this%’ COLLATE utf8mb4_bin; it is what phpmyadmin generates when you go here:


docker exec -it -u postgres example-db psql; # login interactively SELECT * FROM pg_stat_activity WHERE datname = ‘example’; # check open connections to database example # (there shall be none, otherwise you can not drop the database) SELECT pg_terminate_backend ( […]


Travis CI for Complete Beginners If you’re not familiar with continuous integration and don’t already have a repository that you want to build, this guide will show you what it is all about. You need to sign up for a […]


No matter if you decide to for [cc lang=”php” escaped=”true” width=”600″] [/cc] it will set a cookie this way or another. Cookies are sent by the server to the browser and only the domain that ordered the cookie to be […]


  ( ! ) Parse error: syntax error, unexpected ‘::’ (T_PAAMAYIM_NEKUDOTAYIM), expecting ‘&’ or variable (T_VARIABLE) in /some/code.php on line 1321 “T_PAAMAYIM_NEKUDOTAYIM” Its Hebrew for “double colon“. Did you know that ZEND (PHP) is a israeli company? onyourlinuxcommandline# php-cgi […]


From a flexibility point of View: This is totally correct. But what from a RAM point of view. Why have every .php script instanciate a new version of class config.php? [cc lang=”php” escaped=”true” width=”600″] I created an easy small class: […]


get in a bash shell: php -m; # list all currently activated and installed extensions [PHP Modules] bcmath bz2 calendar Core ctype curl date dba dom ereg exif fileinfo filter ftp gd gettext hash iconv imap intl json libxml mbstring […]


Fast summary: PHP + easy learning, probably better for fast prototypes/small projects – grown language, not coding standards enforced = bad for large projects (upgrade project from PHP4->5 is ugly) Ruby – hard to learn and understand (need to understand full […]

23.01.2015 MongoDB (from “humongous”) is a cross-platform document-oriented database. Classified as a NoSQL database, MongoDB eschews the traditional table-based relational databasestructure in favor of JSON-like documents with dynamic schemas (MongoDB calls the format BSON), making the integration of data in […]


… on a debian/ubuntu system… sometimes you need to know (when setting up PDT Eclipse and XDebug) where you php binary is. i found mine via: find / -name php|grep cgi /usr/lib/cgi-bin/php /etc/php5/cgi/php.ini


was taken from some pretty old heise c’t script. [cc lang=”php” escaped=”true” width=”500″] // Prüfe, ob die Empfänger/Absenderadresse einem gültigen MX-Host angehört Zu jeder Domain in einer Mailadresse (nach dem @-Zeichen) sollte ein Mail Exchange Resource Record (MX-RR) im Domain Name System (DNS) eingetragen sein. […]


es klingt wie ein schlechter witz….. es ist nicht (!) trivial, eine datenbank zu durchsuchen. es ist einfacher, das backup.sql einer datenbank in einem Programm ihrer wahl (Browser?, text editor?) zu öffnen und nach dem gesuchten string zu suchen. credits: komischerweise […]