Skip to content

Instantly share code, notes, and snippets.

@ptrnov
Created February 5, 2016 07:52
Show Gist options
  • Select an option

  • Save ptrnov/4b383b3f043197537783 to your computer and use it in GitHub Desktop.

Select an option

Save ptrnov/4b383b3f043197537783 to your computer and use it in GitHub Desktop.
#YII2 Call Procedure
#public function getScripts($page, $section){
# return Yii::app()->db->createCommand("CALL your_stored_procedure(:page, :section)")
# ->queryAll(array(':page' => $page, ':section' => $section));
#}
#$command = Yii::app()->db->createCommand('call my_proc("nice day today")');
#$command->execute();
#$connection = Yii::$app->db;
#$command = $connection->createCommand('sp_annualupdate');
#$command->execute();
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment