Archive for the ‘PHP’ Category

Useless use of if award

Similar to the useless use of cat award. The useless use of if award highlights code examples where people use the if function or ternary operator when the return of the expression does the exact same thing. I first noticed this with returning boolean values from php functions. To protect the innocent the winner of [...]

July 21, 2006 • Posted in: Geek, MySQL, PHP • 4 Comments

How to get your question answered on irc by example

n0other: Hello, I have a field publish_to, I want to select only those entries, where publish_to is not older than today, publish_to contains for example ‘2005-05-30′, I do: SELECT * FROM table WHERE (publish_to - “‘.date(’Y-m-d’) .’”) > 0; (php date function), but that doesnt work, how should I implement this, I cannot change date [...]

May 29, 2005 • Posted in: Geek, MySQL, PHP • One Comment

MySQL Authentication Denial

It seems to me that a lot of people have auth denial when trying to make connections to MySQL. They seem to ignore the text of the error message. ‘Access Denied’ means access denied, nothing else.
Remember three things have to match. The host as MySQL sees it, the username, and the password. When MySQL [...]

March 29, 2005 • Posted in: MySQL, PHP, Rants • One Comment

Block Comments.

Like many of the things I discover only to find out that somebody else thought of it first is a handy way of blocking out large portions of code for testing.

January 19, 2005 • Posted in: PHP • No Comments

Links and the advent of tabbed browsers.

Tabbed browsers have made the target=_new _blank or _top style links annoying and useless. In the old days these links allowed visitors to easily return to your site after viewing a few pages of off site content. Now they are a sneaky surprise that shows up like a hand grenade for those of us that [...]

January 15, 2005 • Posted in: Firefox, PHP, Rants • No Comments