This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages 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