Besides the small security increase by using limit (destructive queries can only affect x rows), there are some performance benefits as well. Consider the following queries: select field1, field2 from Product where ProductID = 1; update User set Firstname = ‘jim’ where UserID = 3; MySQL will update the row that matches the ID, but [...]
I took these screen shots of suggestions in Google while typing, “Stephen Conroy”. Enjoy!
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 [...]
July 11 2009 by
Dave in
IT |
Nick Minchin – Look, up in the sky! There’s an ugly downside to Labor’s broadband project http://www.brisbanetimes.com.au/technology/technology-news/look-up-in-the-sky-theres-an-ugly-downside-to-labors-broadband-project-20090705-d93w.html Senator Nick Minchin, Opposition Minister for communications and the digital economy, writes a report for the SMH R.E. the national broadband plan and some already apparent problems. Despite planning to spend $43 billion on its half-baked “Ruddnet” plan, [...]
A serious Internet Explorer 8 exploit has been revealed without a patch yet, described in this article: http://www.microsoft.com/technet/security/advisory/972890.mspx. Anyone who use IE should follow the steps in the article, or better yet take it as one more reason that IE has been and will continue to be the worst choice in web browser.
I haven’t blogged for so long, I’ve been slacker than Scott! To break the drought, I should blog about something worthwhile: Google Wave. http://wave.google.com/ I applied for it today and wrote them a heiku. Google wave sounds good Maybe I can try it out I would be thankful!