
front and back-end web development, Leeds, UK
Richard's Blog - Design, coding and life in Japan
Databases
A bash script to download your remote MySQL schema and load it locally
Submitted by Richard on Tue, 11/10/2009 - 16:46#!/bin/bash REMOTEUSER=username REMOTEPASS=password REMOTECOMPUTER=remotecomputer.com REMOTEMYSQLUSER=mysqllogin REMOTEMYSQLPASS=mysqlpass DB=database FILENAME=dbschema.sql LOCALMYSQLUSER=localuser LOCALMYSQLPASS=localpassword ssh -l "$REMOTEUSER" "$REMOTECOMPUTER" "mysqldump -u$REMOTEMYSQLUSER -p$REMOTE#!/bin/bash REMOTEUSER=username REMOTEPASS=password REMOTECOMPUTER=remotecomputer.com REMOTEMYSQLUSER=mysqllogin REMOTEMYSQLPASS=mysqlpass DB=database FILENAME=dbschema.sql LOCALMYSQLUSER=localuser LOCALMYSQLPASS=localpassword ssh -l "$REMOTEUSER" "$REMOTECOMPUTER" "mysqldump -u$REMOTEMYSQLUSER -p$REMOTEMYSTags:
Using :include in Rails ActiveRecord call doesnt create a joins query
Submitted by Richard on Tue, 10/27/2009 - 20:37I am currently writing an Rails app that uses quite a few database calls. I wanted to cut these calls down so I knew I would need to use the :include option in ActiveRecord. I was expecting from what Ryan Bates mentioned in one of his RailsCasts that a nice join would be created for me in one query.
Tags:
SQLite3::SQLException: SQL logic error or missing database:
Submitted by Richard on Wed, 10/21/2009 - 10:07I found the following error in one of my unit tests
SQLite3::SQLException: SQL logic error or missing database:
I had a quick look on google and found the following blog post
Tags:
Recent Blog Posts
- Testing controllers in Lithium 2nd Feb 12, 18:19
- Practical Internationalization in Lithium 31st Dec 11, 02:06
- Using OAuth in Lithium 30th Dec 11, 23:47
- How to add your own Tokens from CCK fields in Druapl 7 17th Jun 11, 04:49
- Weaving Lithium #li3 into a legacy PHP application incrementally 5th Oct 10, 11:54