Templating mit Knockout.js

Knockout.js unterstützt das MVVM-Entwurfsmuster von Microsoft und lässt sich sehr gut für das Templating in HTML5-Webprojekten nutzen. Über das data-Attribut lassen sich View-Elemente an ein ViewModel binden, welches die Anzeige dann mit entsprechenden Daten befüllt. Es folgt ein Beispiel für den Einsatz von Knockout.js zum Befüllen von Listen.
Templating mit Knockout.js weiterlesen

Insert only in specific columns with MySQL

If you have a big MySQL table and you want to insert data only in specific columns, then you can do this with naming the columns in parentheses after the table name:

INSERT INTO `wp_posts`(`post_author`,`post_content`,`post_title`,`post_date`) VALUES (0,'Hello World','Text...',NOW());

This works even without apostrophes:

INSERT INTO wp_posts(post_author,post_content,post_title,post_date) VALUES (0,'Hello World','Text...',NOW());