Categories
Zend Framework 1.12

How to use count(*) in Zend Select Statement

public function getCount() { $select = $this->select(); $select->from($this, array(‘count(*) as amount’)); $rows = $this->fetchAll($select); return($rows[0]->amount); }

Categories
Zend Framework 1.12

Zend Executing a straight SQL query without a Model

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 […]

Categories
git

How to remove a tracked file after a .gitignore update

git update-index –assume-unchanged source: stackoverflow

Categories
git

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

Categories
git

Setting Up Beyond Compare as Git mergetool and difftool

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 […]