-
-
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: sql
SQL: Toggle 1 and 0 Value in an Update SQL Statement
I tend to use a lot of tinyint columns as controllers for my database-held objects, usually sticking to the convention of 1 means on and 0 means off. In other words, the perfect target for a SQL toggle statement! Continue reading
SQL: Finding Duplicate Rows based on Multiple Columns
Locating duplicate rows based on multiple column values with SQL turns out to be a fairly simple exercise. Continue reading
Posted in Technology & Code, Tutorials Tagged duplicate, duplicate rows, multi column, multiple columns, select, sql View Comments
MySQL: Prevent Two PHP Scripts from Overwriting One Another’s Table Updates
One of the main ways of dealing with this is to use “locks”, basically allowing one script to lock a particular set of tables, meaning that other scripts can’t make use of those tables until the locks are released. Continue reading
Posted in Technology & Code, Tutorials Tagged lock, mysql, overwriting, race condition, read, right, sql, table lock View Comments
SQL: Add a Unique Compound Key to an Existing MySQL Table
A simple question for today: how does one go about preventing duplicate rows based on the value held by more than one column being inserted into an existing MySQL table? Continue reading
Posted in Technology & Code, Tutorials Tagged compound key, key, multi column, mysql, sql, unique, unique key View Comments
Why Does FOUND_ROWS() Keep Returning 1?
It turns out that there exists an acknowledged bug that if the PHP .ini setting of mysql.trace_mode is set to true, i.e. on, FOUND_ROWS() will always return 1. Continue reading
Posted in Technology & Code Tagged bug, found_rows, mysql, mysql.trace_mode, PHP, sql, sql_calc_found_rows View Comments
Navigation »