To Copy a single table in a Schema into another existing Schema CREATE TABLE myschema.mytbl LIKE myschema2.mytbl; INSERT INTO myschema.mytbl SELECT * FROM myschema2.mytbl; To Copy all the tables in a Schema into another existing Schema In cmd/terminal, dump the database mysqldump -u root -ppass myschema > /path/to/myschema.sql In cmd/terminal, use the new database […]
A list of the 12 scariest stadiums in world football. The main factors: loudness of fans violence of fans flare usage imagery (synchronisation) reputation Picks are subjective and based on Champions League, Europa League games and a few youtube videos. If you have a problem and think there needs to be additions please let me […]
To Redirect: /controllers/yourcontroller::youAction() $this->_redirect(‘/path/to/place’); To Show Profiler in a layout /layouts/yourlayout.phtml $this->addScriptpath(APPLICATION_PATH . ‘/profiler/views/scripts’); echo $this->render(‘util/profiler.phtml’); /application/profiler/views/scripts/util/profiler.phtml Database Profiling Report Total queries executed: Total elapsed time: # Query Time () Disable Zend Layout: $this->_helper->layout->disableLayout(); source: Web Development Blog
Debian 7 (WheezY) Cheat Sheet
Check php version (command line): php -i unzip a .tar: tar -xvf file.tar unzip a .tar.gz: tar -xzvf file.tar.gz Virtual Host Setup: 1. Place the WebSite Files in /var/www/[Folder name] 2. Navigate to /etc/apache2/sites-available 3. Create a new file [SiteName], and nano the vhost 4. Create a symlink in /etc/apache2/sites-enabled with: a2ensite [siteName] 5. Restart […]
Create New MySQl User with Privileges GRANT ALL PRIVILEGES ON dbTest.* To ‘user’@’hostname’ IDENTIFIED BY ‘password’; So for example: Log in to Mysql… mysql -u [root] -p Then type: GRANT ALL PRIVILEGES ON [schema]. To ‘[user]’@'[hostname]’ IDENTIFIED BY ‘[password]’; How to View Current Users and Privileges SHOW GRANTS; or select user,host from mysql.user;