Thoughts n Musings

Search multiple database columns

Quick note, when searching multilpe database columns, avoid using CONCAT I had a terrible time getting it work. Instead I used   where FN +' '+LN like <cfqueryparam cfsqltype="cf_sql_varchar" value="%williams%">

and EE_STAT not like 'T%'

Read More
Comments (0)
Importance of declaring local vars in CFC's
By Brian Fescoe
November 11, 2015
This isn't really a new topic and has been discussed many time's before. However I can't not stress the importance or declaring local vars in CFC's, even query's
 
So what can happen, why all the fuss? Truthfully I never really bothered declare them. I mean isn't ColdFusion supposed to do that automatically?
Read More
Comments (0)
Aggregate functions in SQL
By Brian Fescoe
September 30, 2015

When using aggregate functions is SQL it is important to only SELECT the columns you absolutely need.  In my last post I was trying to achieve basically the same thing as in this one, however even though it achieved the same results I was unable to use it to display the results I want without my function getting really complicated. 

Read More
Comments (0)
SQL is powerful! Use it!
By Brian Fescoe
September 24, 2015

I'll admit I tend to use CF for all my coding but sometimes using SQL is by far and away easier to accomplish your goal as well as just a hell of a lot more quicker. I was struggling with retuning a total number of exercise minutes for a project that I'm working on. I tried double looping, adding variables together all kinds of stuff. Sometimes if you just keep it simple its so much better.  
 

Read More
Comments (0)
Create Archive/Backup Table in SQL
By Brian "DudeHammer" Fescoe
February 10, 2015

Sometimes with users updating records with your apps you need to have an effective way to create a backup of that record just in case. In my case with the applications that I build for the hospital we need it for Audit purposes.

Read More
Comments (0)
Cordova CREATE TABLE and INSERT INTO
By Brian Fescoe
November 11, 2014
The past week I’ve been working with Cordova and jQuery mobile. Refer to my previous article on installing Cordova. On to the SQL…. the SQL it’s a little different than what I’m used to and there is definitely a learning curve but it’s not impossible. I installed the Cordova-SQLitePlugin allow me to right code that allows DB commands without the use of a server.
 
Using phpliteadmin I built my sample database and tables then exported the SQL so I could copy and paste to save some time writing my statements.
Read More
Comments (0)