I’ve been writing an n-tier PHP web application, and I’ve been working on the installer. As part of it, I needed to create stored procedures from PHP. I hit a snag, which was the following: $sql = “delimiter $$ drop procedure if exists spsTableDelete $$ create procedure spsTableDelete(mySession nvarchar(255),myTableID bigint unsigned) begin update sTable set [...]
December 19 2009 by
Dave in
IT,
PHP |
I wrote a password generator today to help me whenever I need to create passwords for myself or a user. It’s pretty easy to use – just enter the password length and character set to use. Enjoy! http://tools.thewebsiteguy.com.au/password.php
December 15 2009 by
Dave in
IT,
PHP |
I wrote a pluraliser in PHP. final class Pluraliser { private static $alreadyPlural = array(“sheep”,”people”,”deer”,”moose”,”premises”,”series”,”fish”,”chassis”,”alms”,”amends”,”cattle”,”clothes”,”doldrums”,”ides”,”pants”,”pliers”,”scissors”,”shorts”,”smithereens”,”trousers”); public static function MakePlural($word) { $returnWord = “”; // If the word is in the list of words that are both singular and plural if (in_array(strtolower($word),self::$alreadyPlural)) $returnWord = $word; else { if [...]
I have been writing a special web application framework around the n-tier pattern, and in the database layer I ran into a problem with MySQL. Within a stored procedure you can order by a variable but not limit by a variable, which puts a small damper on pagination. There are many threads on the Internet [...]
I spoke to a friend recently who had a nightmare story in osCommerce, where when a new customer signs up, another customers details appeared in their address book. What had happened was the store was copied from another live store, and had the database erased, however entries in the address book table were left. As [...]
There are many caveats and pitfalls with websites that people need to be aware of. Having been in IT for over eight years, here are a five main things to watch out for that I have found. Used Terms Domain: is the name for the site you type into the address bar, such as http://thewebsiteguy.com.au. [...]
October 2 2008 by
Dave in
IT,
PHP |
Since I love C# and I am stuck using PHP for a while, I came up with an alternative to enums in PHP tonight. Consider the following class: class FormFieldType { const Text = 1; const Select = 2; const Hidden = 3; const Checkbox = 4; const RadioButton = 5; const Submit = 6; [...]
There’s a new open source eCommerce product out called “Magento”. Website Link http://www.magentocommerce.com I will install a version this weekend if I can to see what it is like.
I got fed up with Windows Server 2008 for the last time yesterday, and I will start the migration back to OpenSuSE Linux on my home dev server. It’s up to version 11 now, so I will install that, even though it’s a pain to export subversion, files and databases. What tipped me over the [...]
I updated the FlowerChix website again. I moved the FlowerChix logo up a little, changed the header border color, added the scrolly image to the right and updated the gallery to move portrait photos to the centre and added a thick border. All over the FlowerChix website looks much better now!