In response to: Its a Total Fire Ban and I'm tense

Comment from: Michael Todd [Visitor]
Michael Todd

Big respect to you Adam and thank you for giving your unique perspective.
Is over 45 years I have speaking publicly about this and I am stepping up efforts now

01/01/20 @ 19:51

In response to: MySQL 101 - Replication

Comment from: Pan [Visitor]
Pan

Nice posts about MySQL, It helps me a lot

04/05/17 @ 15:51

In response to: MySQL 101 - Creating your first database

Comment from: Scott [Visitor]
Scott

Great tutorial, thank you for putting it together, its been really helpful!

How would I set this up if there were multiple authors or publishers to one book?

Thanks

27/09/15 @ 08:36

In response to: On badly behaved crawlers

Comment from: Steve [Visitor]
Steve

Just to mention that we are now 2014 and magpie still hasn’t improved. My advice: ban it from your site right away. I get about 3 - 5 hits a second from that piece of junk when they decide to index my site and I’m tired of paying for their incompetence.

01/12/14 @ 19:21

In response to: MySQL 101 - Sorting and Searching: ORDER BY, WHERE, GROUP BY

Comment from: [Member]
aj

Hi David,

The JOIN statement creates a complex statement that builds on previous components. If you look at the first join (between author and book) you now have effectively a meta-table that includes fields from both. The next join needs only to reference fields from the meta-table, which in this case includes fields from book as well as author.

This is no to say that you couldn’t restructure the query to match your supposition, however you’d need to think carefully about the direction (LEFT/RIGHT) of the join as I’m using LEFT JOIN knowing that it will always provide me with a result provided there is a valid author, regardless of if that author has a book or publisher. If I structured the query such that book was before the FROM then I would need a valid book to list an author.

Note that I’m using the term meta-table as a convenience. The underlying database doesn’t need to create a separate structure.

11/08/14 @ 16:47

In response to: MySQL 101 - Sorting and Searching: ORDER BY, WHERE, GROUP BY

Comment from: David [Visitor]
David

Hello,

in the previous episode to this, a SELECT query was made with 3 joins, namely:

SELECT `title`,
CONCAT_WS(’ ‘,`author`.`first_name`,`author`.`last_name`) AS `author`,
`publisher`.`name` AS `publisher`,
`format`.`name` as `format`,
`price`, `isbn` FROM `book`
JOIN `author` ON `book`.`author` = `author`.`id`
JOIN `publisher` ON `book`.`publisher` = `publisher`.`id`
JOIN `format` ON `book`.`format` = `format`.`id`;

As I understand it, the tables `author`, `publisher`, and `format` each have a separate link back to the book table. Is that correct? Now in this episode you have the query:

SELECT CONCAT_WS(’ ‘,`author`.`first_name`,`author`.`last_name`) AS `author`,
`book`.`title` FROM `author`
LEFT JOIN `book` ON `author`.`id` = `book`.`author`
LEFT JOIN `publisher` ON `publisher`.`id` = `book`.`publisher`
WHERE `publisher`.`name` = ‘Bantam’;

I can see in the first join that the `book` table is linked back to the `author` table. But the second join to `publisher` is a join to the `book` table. I the thought that with multiple joins all tables following JOIN statements had to link back to the initital table referred to in the FROM statement.

08/08/14 @ 10:09

In response to: In memory of Eileen Mary Donnison (nee Cain)

Comment from: Boel [Visitor]
Boel

Adam, what a lovely tribute to your mother. She sounds like someone I’d like to have met. My condolences.

Boel

07/05/14 @ 09:50

In response to: In memory of Eileen Mary Donnison (nee Cain)

Comment from: Sarah [Visitor]
Sarah

Thank you for sharing this, she was an amazing Gran and an inspiring woman.

05/05/14 @ 22:28

In response to: MySQL 101 - Retrieving data: SELECT and JOIN

Comment from: [Member]
aj

Thanks, Jose, I’ve updated the links.

26/02/14 @ 18:33

In response to: MySQL 101 - Retrieving data: SELECT and JOIN

Comment from: Jose [Visitor]
Jose

Hey,

Great guides for starters (like me) only comment so far is about the website. The link for your ‘last episode’ has an extra http// in it (so it doesn’t work unless you remove it). And on your last episode (creating the database) you don’t seem to have a hyperlink to the next episode - just text saying what will be covered. Thought I’d comment just so people who are looking for these in order will have an easier time (I googled for this page to find it when the hyperlink on the previous wasn’t working).

Thanks again!
Jose

11/02/14 @ 02:53

In response to: MySQL 101 - Referential Integrity

Comment from: SQL dev [Visitor]
SQL dev

I have rarely seen programming taking advantage of Referential Integrity constraint e.g. CASCADE on UPDATE. It’s immensely useful specially in large application where data is subject to change by multiple people. Here is another good example of referential integrity in MySQL http://javarevisited.blogspot.com.ar/2012/12/what-is-referential-integrity-in-database-sql-mysql-example-tutorial.html which explains cascading.

09/01/13 @ 14:30

In response to: Predictions of a Long Hot Summer

Comment from: [Member]
KC

They don’t call the Redbank Nature Reserve the Bealiba Second Cemetery for nothing (mine shafts everywhere…)

23/11/12 @ 15:27

In response to: Predictions of a Long Hot Summer

Comment from: Evan [Visitor]
Evan

“I’ve got a plan for a spot of stress relief.”

Yes, but the ground will be too hard for grave digging…

23/11/12 @ 12:19

In response to: Ducklings - Day 3

Comment from: [Member]
KC

Alas these days, some of the excess boys do end up on the table.

Whilst I end up in the back room pretending they aren’t on the table…. others in the house are less conflicted…

19/11/12 @ 15:24

In response to: Ducklings - Day 3

Comment from: Sally [Visitor]
Sally

I guess they’re not destined for a yummy Duck L’orange when they grow up?

It’s ok - I’m slapping myself - bad Sally!

16/11/12 @ 18:25

In response to: On badly behaved crawlers

Comment from: Neil [Visitor]
Neil

Just an update…We applied the robots.txt fix and noticed a distinct drop in origin traffic and CPU usage.

Not all magpie-crawler connections have gone but most have. We will only block the IPs as the last resort but it may come to that if we can’t get rid of them all via robots.txt.

Seems magpie is (as stated above) simply overly aggressive.

10/09/12 @ 19:36

In response to: Open for Business

Comment from: [Member]
KC

Oh the conversation was had…..

31/08/12 @ 12:25

In response to: Open for Business

Comment from: Evan [Visitor]
Evan

I dare you to change the sign to say, “Fresh Eggs. Direct from a chooks bum to you.”

31/08/12 @ 12:23

In response to: Dealing with pre-emptive grief

Comment from: [Member]
aj

Hi Eli,

Unfortunately I ended up having to make the decision, as I knew I would. One thing you learn when owning pets is that you will outlive them, and that more often than not you are going to have to make some hard decisions. What you have to remember is that you have to act in the best interests of your pet. It is not betrayal to end suffering, although the point at which you decide that quality of life has gone will be different for different people and different situations. In fact, I see it as a duty, a responsibility of ownership.

I hope that your situation is easy on both of you, but please, don’t shy away from the hard decision if and when it becomes necessary. You will have doubts, that is only human - but if you love your dog the way it comes across from your words you will know when it is time to act.

30/08/12 @ 11:17

In response to: Dealing with pre-emptive grief

Comment from: Eli [Visitor]  
Eli

I took my twelve yr old golden retriever for a checkup and although she had been put on a reduced calorie diet and lost some weight and her arthritis was starting she had some really good days. The shock was the blood test showed she has leukemia and will die in 30 to 60 days. She shows no signs except the blood counts, eats well, no stomach problems but has anemia which slows her down. I am hoping I will not have to make that choice unless she stops eating or drinking as I feel I would feel I am betraying the animal that loves me most and will do anythings to please me. I understand how you feel pray so that he goes before you have to make a choice and he does not suffer.

30/08/12 @ 09:21