Tuesday, November 11, 2014

How do you protect your site from sql injection in zend when using select query?

You have to quote the strings,

$this->getAdapter ()->quote ( );

$select->where ( " = ", );

OR (If you are using the question mark after equal to sign)

$select->where ( " = ? ", );

How to include css from controller and view in zend?


include within a view file: $this->headLink()->appendStylesheet(‘filename.css’);

include  within a controller: $this->view->headLink()->appendStylesheet(‘filename.css’);

And then somewhere in your layout you need to echo out your headLink object:

headLink();?>