smf: recover deleted topic

by prettyscripts on 2010-07-14 12:51:12 • Leave a comment »

smfsql

important: you must have a backup of the database with deleted topic. if not, you might as well skip this post. instruction here is based on smf v1.1.x and uses phpmyadmin. it's a free browser based mysql administration tool. but if you're a mysql expe… more »

Tags: delete, phpmyadmin, retrieve, smf, topic

symfony and doctrine: select distinct column

by prettyscripts on 2010-06-16 16:28:27 • Leave a comment »

phpsymfonysql

to select distinct column values from a table, there are a few things to note to make sure only distinct rows are returned. in /path/to/lib/model/doctrine/SomeTable.class.php: public function getDistinctValue() { $q = Doctrine_Query()::create()… more »

Tags: distinct, doctrine, select, symfony

mysql: convert number to string

by prettyscripts on 2009-05-29 10:51:17 • Leave a comment »

miscsql

to copy value from a column in table a to a column in table b, the syntax is straight forward:insert into new_table (new_column)select old_column from old_table but when new_column is varchar and old_column is integer, you will get an error.… more »

Tags: convert, mysql, number, string