MySQL/SQL: count chars in table field
SELECT CHAR_LENGTH(field)-CHAR_LENGTH(REPLACE(field,’-',”)) AS count FROM table
SELECT CHAR_LENGTH(field)-CHAR_LENGTH(REPLACE(field,’-',”)) AS count FROM table
Auf Anfrage einiger Leser habe ich jetzt die Klasse kommentiert und Informationen zur Lizenz hinzugefügt. An der Funktionalität hat sich nichts geändert. Die aktuelle Version 1.0.5 ist unter folgender URL zu finden: http://bohuco.net/labs/php-websocket-class/lib/WebSocketServer1.0.5.php.txt
easy if you know how …
myarray.sort(function(a, b){ return a.toLowerCase() > b.toLowerCase(); });
If you have already added a custom meta field to your wordpress posts with add_meta_box you probably want to query such posts in your template. You can do that with query_posts(), it supports the meta_key and meta_value attributes.
query_posts($query_string.'&meta_key=onStartpage&meta_value=1');
If you want add fields to the wordpress user profile then two hooks are important for you.
Read the rest of this entry »
Another quicktipp for wordpress plugin developers. With the shortcode API you can easily provide additional commands for wordpress authors …
Another quicktipp for wordpress theme developers.
If you want to exclude one or more categories from a page (startpage, category-page), you can call the query_posts function with negative category-ids …
<?php query_posts($query_string . '&cat=-1,-2,-3'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <!-- POST --> <?php endwhile; endif; ?>
Another quicktipp for wordpress plugin developers. Registering a sidebar widget can end with a fatal error if you use the code from the wordpress documentation …
In “Google Closure Compiler with PHP” i described how you can use the compiler online via http. Now i will show how you do it local on your server with the java command line application …