Tutorial on how to go back to previous page Zend Framework Controller: $request = $this->getRequest(); $referrer = $request->getHeader(‘referer’); $this->view->referer = $referer; View:
Author: me
Connecting MySQL Workbench to Server MySQL
Use: GRANT ALL ON *.* to root@’%’ IDENTIFIED BY ‘your-root-password’; Use % as host if you don’t know where user is connecting from. Also make sure Mysql is running and that iptables is not blocking the port. The above solves this error: Host … is not allowed to connect to this MySQL server
public function getCount() { $select = $this->select(); $select->from($this, array(‘count(*) as amount’)); $rows = $this->fetchAll($select); return($rows[0]->amount); }
How to Execute a straight SQL query without the hassle of a model. #application/controlers/MyController.php I assume the Database is setup in the config file, Application.ini. $dbAdapter = Zend_Db_Table::getDefaultAdapter(); $sql =’SELECT * FROM users WHERE id > 23′; $statement = $dbAdapter->query($sql); $row = $statement->fetch(); if ($arr[‘id’] == 45) $this->view->response = ‘yes’; else $this->view->response = ‘no’; If […]
git update-index –assume-unchanged source: stackoverflow