а вот на что PMA ругается
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ТеÑ
если сделать запрос
SELECT * FROM `notebook` WHERE `user_id` = 1 AND `msg` = '[code=php]echo'Тест';
'[/code]