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
Change Git Username and Email
This is a Tutorial: Change Git Username and Email These instructions are given to you when you first commit with git. Just btw. git config –global user.name “Your Name” git config –global user.email you@example.com Afterwards type: git commit –amend –reset-author
In git config #C:/User/Name/.gitconfig: [user] email = my@email.com name = My Name [core] … [diff] tool = bc3 [difftool] prompt = false [difftool “bc3”] path = C:/Program Files (x86)/Beyond Compare 3/Bcomp.exe trustExitCode = true [merge] tool = bc3 [mergetool] prompt = false keepBackup = false [mergetool “bc3”] path = C:/Program Files (x86)/Beyond Compare 3/Bcomp.exe […]