Archive for June 2010

Configuring oAuth for Tweet-SQL

Warning: count(): Parameter must be an array or an object that implements Countable in /home/fbsqlcom/public_html/ on line 31

Twitter are soon requiring that all applications accessing their API use oAuth instead of basic authentication. This means you don’t have to provide your password to third parties when using their apps. I’ve been busy adding this to the upcoming version of Tweet-SQL and here’s a quick guide to setting up oAuth. After installing Tweet-SQL […]

Error dropping database (can’t rmdir ‘./database’, errno: 39)

Just a very quick post today! If you encounter this error when attempting to drop a MySQL database; Error dropping database (can’t rmdir ‘./database’, errno: 39) Then you probably have some rogue files in the folder where the database files are located. If you cd into this directory you will be able to view these […]

Unsigned Integer Arithmetic in SQL

Not the sexiest blog title in the world but I thought I’d knock up a little post on the behaviour of MySQL and SQL Server with integer subtraction. How would you expect a database system to behave with positive and negative data types? Microsoft SQL Server doesn’t really have unsigned data types. All integer types […]


I usually use SQLYog to write any stored procedures for MySQL. Whenever you alter a procedure the editor essentially generates SQL to drop and then recreate it. ?View Code MYSQLDELIMITER $$   USE `db`$$   DROP PROCEDURE IF EXISTS `my_proc`$$   CREATE DEFINER=`root`@`%` PROCEDURE `my proc`() MODIFIES SQL DATA SQL SECURITY INVOKER COMMENT ‘Just an […]

Cross database foreign keys?

Colleague: “Can you have foreign keys referencing other databases?” Me: “Erm… I don’t know, but it I’ll find out.” I’ve always thought tables with these relationships should exist in the same database so I’ve never attempted this. But I don’t like not knowing things so I set to find out. The answer, as it often […]