Replacing Substrings using SQL, not PHP

Let’s say you have a problem: A recent DB migration has escaped a lot of quote marks within your fields and now your app is acting funny. Your task is to fix the problem, and do it FAST. Enter the replace() function in MySQL (assumed other RDBMs as well, such as Postgres and MSSQL) UPDATE …

What’s your Fortune?

Here’s a fun little thing you can do for your next site goodie: display your users’ “fortunes” from the command-line interface, CLI, application Fortune. On Fedora, install: % sudo yum install fortune-mod from PHP (fortune.php) <pre> <? passthru(‘fortune’); ?> </pre> I pre-formatted the text because it comes out looking as it does in the CLI. …

Hey there! Come check out all-new content at my new mistercameron.com!