-
-
What, who, where am I?!?
Craig Lotter is a web developer based in Gordon's Bay, South Africa, who seems completely incapable of shaking off that pesky inner child within, the one that forces him to love all things animated or hand drawn.
The Rugged Rock of Craig contains snippets of his life, popular culture and all the important things like anime, manga, games and comic books. The CodeUnit of Craig on the other hand contains the more serious stuff like code snippets and tutorials, while the House of C chronicles his foray into the world of web comics.
For which it never seems he has enough time anyway.
-
Rugged Rock Studio
- CodeUnit Collections
- Funakoshi Karate International South Africa
- Rugged Rock Studio: The Portfolio of Craig Lotter
- The Codeunit of Craig
- The House of C
- The Rugged Rock of Craig
Tag Archives: PHP
PHP: How to Check if mysql_query() has returned a Result Set
mysql_query() is the powerful PHP function tasked with handling the execution of all SQL statements against the currently active database connection string. It handles all variations of SQL commands, including SELECT, INSERT, UPDATE, DELETE, etc, and always returns false if the command execution should fail. However, only on SELECT does it bother returning a valid result set – the rest of the time it returns true.
Continue reading
Ubuntu: How to set PHP’s default Time Zone
From PHP 5.1 onwards, you have been able to define the default time zone which is to be used in PHP regardless of what time zone the server or Apache might be using. To do this requires some minor adjustments to your php.ini config file. Continue reading
How to Reuse a MySQL Result Set
To reuse an existing result set returned from a query is actually pretty simple thanks to PHP’s mysql_data_seek function and the fact that mysql_query returns a buffered result set by default.
Continue reading
Posted in MySQL, PHP Tagged data seek, mysql, mysql_data_seek, PHP, result set, resultset, reuse View Comments
PHP: Loop through each string line in a Textarea
To loop through all the string inputs entered on a new line for a textarea control is not particularly challenging and uses basic array functionality to achieve this.
Continue reading
PHP: Return all String Permutations for a 1 Dimensional Array
Getting all the possible string permutations of an array can be pretty useful if you are trying to unlock something and this nifty little function does exactly that: Continue reading
Navigation »