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

weird issue with Like and Where

 
Eman Adenola
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh wow..how many threads in one day, eh?
lol..well to the point
I am getting results i think i shouldn't be getting..but i am not sure why I am getting them..so I am here..again

i have a table that has an id and a name

and i have a query like so:


yep I hardcoded when I thought something might be wrong with the variable data..but it didn't matter...
The thing is I have table that has an id of 3 and name Lincoln..but the sql statement picked it up and that doesn't make sense to me.
id=1 is false, however Lincoln has an i in it..
false && true = false...
so what is happening here?
Any ideas?
Thanks
 
Rob Spoor
Sheriff
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And what name does the record with ID 1 have? Does that name perhaps also have an "i" in it?
 
Eman Adenola
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Spoor wrote:And what name does the record with ID 1 have? Does that name perhaps also have an "i" in it?

yeah, its name is Lincoln
i fixed the problem..i had to make the variable for the resultset of a database a session in order for it to work and i don't know why.
Making its scope session seems to clean the resultset but for some reason request scope doesn't do that..and I really don't know why
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic