Harry Bailey

Harry Bailey specialise's in turning project chaos into clarity. With two decades of hands-on agency experience and agile-certified expertise, he offers practical, immediately actionable strategies, not just theory, to dramatically improve agency project delivery.

MySQL Multiple Primary Key Columns In A Table

Some database management tools refuse to admit you can add multiple primary key columns to one table, so you might have to do it with direct sql syntax ( deep intake of breath ).

Multiple primary keys make ‘ON DUPLICATE KEY UPDATE column = column + 100’ type queries a shed load more flexible.

Anyway, on with the code:

ALTER TABLE tablename ADD PRIMARY KEY (column_one, column_two)

And there you have it. Robert’s your fathers brother.

Internet Banking and Webhooks

Why is it that banks are always 5 years behind when it comes to the internet?

For those not in ‘the know’, a ‘webhook’ is where you define a url ( or address ) you would like to be notified when certain things happen on a website you use.

As an example, you tell PayPal to notify your payment confirm url when your business account receives a payment. They then send the payment details to that url so an automated script can do something with them. Usually tell you to send the item they bought.

Continue reading

Panic’s Coda Bookmarks In Code Navigator

It is mentioned on the Panic site, but it took me ages to find it.

You can add bookmarks or tags to a file that will appear on Coda’s code navigator. Most of the time it’s as simple as an !

CSS:
/* !bookmark */

HTML:
<!-- !bookmark -->

Javascript:
/* !bookmark */ or // !bookmark

PHP:
/* !bookmark */ or // !bookmark

You can of course replace the word bookmark with anything you like.

For a full list:
http://www.panic.com/coda/developer/quicktip/5.php