Category: ServerSide / backend

MySQL search replace update where sql query
14.02.2019

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:

02.02.2018

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 (pg_stat_activity.pid) […]

23.01.2017

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 […]

13.01.2017

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 […]

16.07.2015

  ( ! ) 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“. http://stackoverflow.com/questions/592322/php-expects-t-paamayim-nekudotayim Did you know that ZEND (PHP) is a israeli company? onyourlinuxcommandline# php-cgi […]

16.07.2015

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: […]

25.06.2015

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 […]

23.06.2015

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

https://en.wikipedia.org/wiki/MongoDB 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 […]

09.04.2014

… 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

20.03.2014

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. […]

29.10.2013

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: http://stackoverflow.com/questions/562457/search-for-all-occurrences-of-a-string-in-a-mysql-database komischerweise […]