Simple function to convert a string to proper case
CREATE FUNCTION PROPERCASE
(
--The string to be converted to proper case
@input varchar(8000)
)
--This function returns the proper case string of varchar type
RETURNS varchar(8000)
AS
BEGIN
IF @input IS NULL
BEGIN
--Just return NULL if input string is NULL
RETURN NULL
END
<a href="http://www.fruitbatscode.com/uncategorized/proper-case-sql-function#more-293" class="more-link">Read more...</a>
Simple Permissions
The permission system is simple in design but allows complicted permissions to be created by layering the mixed key, role and level properties. The concept is that we have permissions that any item wanting to check just asks the permission system if the logged in user can carry out the action. At its simplest form it is used thus: Read more…
I spent all weekend trying to convert a Sql Server db to a MySql v5 db and found it quite a frustrating experience! When you’re sytnax is incorrect MySql helpfully says ‘You have an error in your sql syntax near:’ and error 1064. No help with which command causes the error and the position it picks for the start of the problem is usually wrong. God we’ve been spoilt by Sql Server.
Read more…
Spent this weekend working on the cms and made good progress. Got the core page rendering working with masterpages and themes. Tested it with Db and normal aspx pages. I’m wondering whether I’ve over abstracted everything atm!
Just added the security system and user accounts. Now I’ve got to decide how to expose the account creation side of it. Normally I’ve done that through controls but I’m going to have to create a utility class that devs can use and create their own controls for.
Read more…
Was explaining to a friend how to cope with duplicates today so thought I’d just stick a quick note up for him to refer too. Finding duplicates in SQL is relatively easy when dealing with one field, we just need to count the number of occurances of the field: Read more…
I’ve now written 4 cms’ and have decided as a personal project to create a core system that can easily be adapted to many tasks. Over the past 4 cms’ I’ve used the same code a lot and created a central core of utils (imaginatively called Gist!) but I want to go a step further and have a central system I can use straight off.
Read more…