snippet - MySQL simple update query example
15 Aug, 2018
There are actually two ways of updating in MySQL. This example uses the simpler way. Other way is to define columns and corresponding values sepparately.
snippet - Number to words in PHP
24 Jul, 2018
Helper function for converting numbers to words. There is same function available in PHPs NumberFormatter class, but using it is not always possible, since it's not enabled by default.
snippet - Tables content to exclude on DB export in Drupal 7
24 Jul, 2018
Exclude content from these tables, to get clean db backup(backup_migrate module usage). You can even use git to store your database, when you don't export cache tables.
snippet - Migrate Field Collection in Drupal 7
25 Jun, 2018
You can use migrate to import field collections. It has full support. You just need to define the host entity, where you have defined the field collection.
snippet - Explode multiple delimiters PHP
4 Jan, 2016
To explode multiple delimiters PHP you have to use regular expression. Add your delimiters in the parentheses separated by pipe. You might have to escape your characters if they have meaning in PCRE...
snippet - ffmpeg2.8: installing x265 (2.8-1) breaks dependency ''
2 Jun, 2018
error: failed to prepare transaction (could not satisfy dependencies) ffmpeg2.8: installing x265 (2.8-1) breaks dependency ''
snippet - Load a file by uri in Drupal 7
16 May, 2018
This snippet shows you how to load a file by uri. Basically this option is available with file_load_mulitple only.
snippet - MySQL: insert/update multiple rows with a single query
16 May, 2018
To insert multiple rows with a single query you can use regular insert with multiple value rows. You can also use update if you have primary key set.
snippet - Import csv to MySQL FAST
16 May, 2018
Import csv file to MySQL, the fastest way is to use a direct import with query. You have to have the columns created the way you need.
snippet - MySQL export query as csv directly
8 May, 2018
Example query for direct csv saving from mysql. Using query to import or export data is the fastest method. You can export your query results as csv with custom syntax. You have to use union to join...