Showing posts with label Cakephp. Show all posts
Showing posts with label Cakephp. Show all posts

Tuesday, 6 May 2014

Cakephp: Insert Query In Loop

If You are Using $this->Model->save() in  LOOP then this will not work.
TO overcome this issue simply add

Add this before save this will move the cursor to a new Line and then insert again.

$this->Model->create()
$this->Model->save()

Monday, 5 May 2014

Cakephp: Debugging Query in Cakephp

$log = $this->Model->getDataSource()->getLog(false, false);
debug($log);

Tuesday, 29 April 2014

CakePhp Get Complete path

You can Have a Complete Path in cakephp using

<?php echo Router::url( $this->here, true ); ?>

If you want a relative path to be shown Use this :

<?php echo  $this->here; ?>