more fixing sql/php