Viewing entries posted in August 2011

Copying records from one table to another: INSERT from SELECT in SQL

24 August 2011

Tags: , ,

If you find yourself writing something like the following code, try to stop and think for a while (the example uses PHP Database Objects extension):


$insert = $dbh->prepare('INSERT INTO cheapBooks VALUES (?)');

foreach($dbh->query('SELECT ID FROM Books WHERE price < 10') as $book){
        // Insert cheap books into a temporary table
        $insert->execute(array($book['ID']));
}

0 comments | Read the full post

Silverstripe (Blog module): localisation of Tag Cloud widget

21 August 2011

Tags: , , ,

In current version of Silverstripe's Blog module it's impossible to show non-latin tags in Tag Cloud widget — you'll see garbage instead of them:Garbage in Tag Cloud widget

0 comments | Read the full post


Интернет реклама