Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using Strings to query database??

 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a simple question. Do I have to trim() the strings before using it in a select statement?
for example:
String thisString = request.getParameter("some");
thisString = thisString.trim();
.
.
.
or is it irrelevant??
 
Graham Thorpe
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes we can do trim function before select
statement.This is very useful code also why because of not all database are not supported to trim function proprty.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic