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

Categories
Server Yii Framework

Setting up Yii Environment on your Server

How to Setup Yii on your Environment Server 1. Make Sure your vhost is setup correctly, with debian/ubuntu that is /etc/apache2/sites-available/sitename Options FollowSymLinks -Indexes Includes AllowOverride All 2. Set your include path in php.ini that is etc/php/apache2/php.ini ; UNIX: “/path1:/path2” include_path = “.:/usr/share/library” 3. Download, get url from Yii Download Page wget https://github.com/yiisoft/yii/releases/download/1.1.14/yii-1.1.14.f0fee9.tar.gz 4. Unzip […]