You can delete from multiple tables (which don’t have foreign keys set up) using one query if you create it using the following syntax:
Continue readingHarry Bailey
New Twitter Last Read Tweet Bar Bookmarklet
Update: Twitter has now added this to the site and the bookmarklet below is no longer of any use.
Got the new Twitter?
Annoyed that when you click the bar that says ‘x new tweets’ you can’t find the last one you had already read?
Harry Bailey to the rescue.
Update: Now works in Chrome, Safari, Firefox. Anyone checked Internet Explorer?
Drag the following link to your bookmark bar, go to the Twitter page that’s annoying you, click the bookmarklet:
Hide topics row in Postbox message view
I love Postbox. I talk about it a lot. However Postbox is trying to be more than a mail client and as part of that is attempting to sneak into the world of GTD with the inclusion of todos and topics.
Now call me old fashioned but I use Things for my GTD stuff and so don’t use todos or topics in Postbox.
“Not a problem really is it?” I hear you yell. Well no until you look at the amount of space the topic row of Message View takes up. Believe me on a small screen this matters:
MySQL Toggle a Fields Value
UPDATE `table_name` SET `field_name` = (SELECT CASE `field_name` WHEN 1 THEN 0 ELSE 1 END) WHERE `id_column` = 1
Or with text strings
UPDATE `table_name` SET `field_name` = (SELECT CASE `field_name` WHEN 'foo' THEN 'bar' ELSE 'foo' END) WHERE `id_column` = 1
More powerful jQuery getScript with cache control
If you love getScript as a shortcut method in jQuery, but you hate not being able to control whether the script calls from the browsers cache or not then you can override the built-in function with a new one which is backwards compatible, so it won’t break any of your old code, and allows you to choose true or false to caching.
Read the original post by Jamie Thompson (via Internet Archive)
(function($){
$.getScript = function(url, callback, cache){
$.ajax({
type: "GET",
url: url,
success: callback,
dataType: "script",
cache: cache
});
};
})(jQuery)
[carousel keywords=”jquery” tag=”fetchit-21″]