Skype Mobile Phone

October 18, 2007 by admin · Leave a Comment
Filed under: Stumble 

Skype mobileThe next 12 months will be incredibly interesting in the phone market. It seems like there are a number of folks who will be entering the space. Two of the biggest names are Google (GOOG) and Skype (owned by Ebay). The entries are not confirmed, but ask a cell phone tech company, in the valley, if they are working on anything for a Google phone and you will probably see some tight lips, or hear “no comment”. Of course a couple of beers later during an “off the record” conversation should reveal much more.

Techcrunch has a nice write up about the Skype plans.

Is this a case of the ‘grass is greener’? My bet is that this is a case where many people are starting to see the capability that will come with something like WiMax. With the money behind it (Intel), this will be a reality.

It appears that the Skpe phone is gearing toward functions like no cost PTT (push to talk) to other Skype users. Logical.

In any case, I have to believe that this will be good for the end user. Better hardware and more competition. What to choose… iPhone, gPhone, ePhone?

Apostrophe Issues in an Update Query

October 3, 2007 by admin · Leave a Comment
Filed under: Coding 

Coldfusion Code Tip…

When things are frustrating, and have a simple solution, I like to share.

When you are a doing a data update, you will often have a text field in a form that will bring an apostrophe with it. For example, if I am collecting business information, I could have a visitor enter their company name. The name might be Amy’s Gems. If I do a sloppy insert statement like the one below, the query will fail.
<cfquery datasource="#application.dsn#">
UPDATE customers
SET companyName='#form.companyName#'
WHERE id=#recordID#
</cfquery>

If you are allowing your users to update or insert their own data, this will error out (with IIS and MS SQL DB running CF8) when your user includes an apostrophe in the field.

You can avoid this by enclosing your values in a cfqueryparam. In fact, getting into the habit of using cfqueryparam in every instance will be a much more secure method and will reduce your exposure to malicious attacks such as a SQL injection hack.

The above query would now look like…
<cfquery datasource="#application.dsn#">
UPDATE customers
SET companyName=<cfqueryparam value="#form.companyName#" cfsqltype="cf_sql_varchar">
WHERE id=<cfqueryparam value="#recordID#" cfsqltype="cf_sql_integer">
</cfquery>

Happy coding. This simple fix might keep someone from pulling their hair out. You can avoid all kinds of cfreplace and cfset statements and end up with an app that is more secure.

    Ads of Interest