http://ru.stackoverflow.com/questions/474965/%D0%92-%D0%BA%D0%B0%D0%BA%D0%BE%D0%BC-%D0%BF%D0%BE%D1%80%D1%8F%D0%B4%D0%BA%D0%B5-%D0%B8%D0%B7%D1%83%D1%87%D0%B0%D1%82%D1%8C-%D0%BB%D0%B8%D1%82%D0%B5%D1%80%D0%B0%D1%82%D1%83%D1%80%D1%83-%D0%BF%D0%BE-php-mysql