php - Symfony 1.4 Doctrine run custom query in not working -


i want run release query in symfony 1.4 , doctrine. tried bellow.

   $query = "replace  `ski_chalet_price` (`ski_chalet_id`,`month`,`d_3`) values ('43', '2013-04-01', '45');"         $conn = doctrine_manager::getinstance()->connection();    $stmt = $conn->prepare($query);    $stmt->execute(); 

but make following error.

parse error: syntax error, unexpected t_variable in /home/dinuka/workspace/chalet/apps/owner/modules/chalet_manage/actions/actions.class.php on line 222 

please me. method replace query in symfony.

your $query variable doesn't have semicolon on end.

   $query = "replace  `ski_chalet_price` (`ski_chalet_id`,`month`,`d_3`) values ('43', '2013-04-01', '45');"     

should be

   $query = "replace  `ski_chalet_price` (`ski_chalet_id`,`month`,`d_3`) values ('43', '2013-04-01', '45');"; 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -