Archive for the 'Uncategorized' Category

September 24th 2007

Terry Chay: Why PHP triumphs over Ruby

Terry Chay writes another hilarious post about PHP vs. Ruby

“I’m really low on my scatological count here…I’m sorry I didn’t crack enough jokes or use enough [cuss words], but I’m sure people will forgive me. They can just attend one of my talks and get their cuss quota for the year. And if not, coding these web apps themselves involves a lot of swearing—a lot of blood, sweat and swear.”
—me on Pro PHP Podcast

I’m not posting my talk yet because I have to give it again at ZendCon. So here is a bit of a teaser.

[Do not hit the jump if you are easily offended. I really mean it!]

No Comments yet »

December 13th 2006

Vertical MySQL Result Output

Ever had the results of a mysql query explode all over your terminal window like this:

mysql> select * from agtAgents limit 1;
+---------+------------+---------------+-----------+-------+-
--------+-------------+
| agentID | divisionID | corporationID | stationID | level |
quality | agentTypeID |
+---------+------------+---------------+-----------+-------+-
--------+-------------+
| 3008416 |        13 |      1000002 |  60000004 |    1 |
-18 |          2 |
+---------+------------+---------------+-----------+-------+-
--------+-------------+
1 row in set (0.00 sec)

That’s not the easiest thing in the world to read, much less make sense of. To make the output a little easier on the eyes, try ending your query with a \G:

mysql> select * from agtAgents limit 1 \G
*************************** 1. row ***************************
      agentID: 3008416
  divisionID: 13
corporationID: 1000002
    stationID: 60000004
        level: 1
      quality: -18
  agentTypeID: 2
1 row in set (0.00 sec)

No Comments yet »