Battle of the CSS positions
It all began a couple days ago, one slightly dull Tuesday afternoon. The air was thick and the light was dimmed. Ahem, I have a challenge for you; try and place a div underneath another. “Piece of cake,” you say. “That’s hardly a challenge”. Well, not so it would seem. I was perplexed by what I saw for a few minutes, at least. So much that I wrote this article and created a little demonstration.
Removing tables from HTML
Coffee spurts everywhere. “What!”, I can hear you choking, “Are you crazy?”.
I agree. Tables are great. They provide a implementation that is pretty much identical across all browsers. Not to mention they are pretty kick-ass at presenting tabular data. So why is it then that people feel the need to eradicate them altogether?
“Eh?” example number 1
A couple of days ago I stumbled across an article written by Antonio Lupetti…
Delete from multiple MySQL tables
I have just spent the last half hour scratching my head over how to delete from 2 tables, joined by a unique ID. For some reason, MySQL kept spitting out: Unknown table ‘myTable’ in MULTI DELETE. Many visits to the MySQL manual still made me scratching my head (Yes, looking back on the manual makes me hit my head for not noticing the “Note” about a third of the way down the page).
The syntax
The MySQL manual says the syntax is:
- DELETE [LOW_PRIORITY] [QUICK] [IGNORE]
- tbl_name[.*] [, tbl_name[.*]] ...
- FROM table_references
- [WHERE where_condition]
jQuery tooltip
Sorry for the lack of updates recently but I have been swept off my feet with work. A couple days ago I redesigned part of my companies website, Centation, whereby I needed to make a little jQuery tooltip to add a dynamic flair to the page. Well, I didn’t need to make one, but the lack of quality jQuery tooltip plugins forced me to. I thought I would give you the code of how I did this, and give you a couple demonstrations.
Parse string as a query string
There has been an odd occasion in the past where I have used a string (Note: not the query string) in order to form a settings class in some way or another. I didn’t realise that there was a built in PHP function for this, and is only through reading through most of the PHP string functions that I came across it (and many other interesting functions).
The times of doing this are long gone (Am using the query string here just for clarity):
- <?php
- foreach (explode('&', $_SERVER['QUERY_STRING']) as $chunk) {
- $chunk = explode('=', $chunk);
- $variables[$chunk[0]] = $chunk[1];
- }
And I am now saying “hello” to this:
- <?php
- $variables = parse_str($_SERVER['QUERY_STRING']);
Want me to talk about something in particular? Drop me a line and I may just do that.
