Author |
Message |
Bob
Yavvanam Kaatesina Bewarse Username: Bob
Post Number: 2010 Registered: 03-2005 Posted From: 220.240.44.49
Rating:N/A Votes: 0(Vote!) | Posted on Monday, September 12, 2005 - 10:57 pm: | |
|
Sinna
Celebrity Bewarse Username: Sinna
Post Number: 9589 Registered: 04-2005 Posted From: 68.226.157.141
Rating:N/A Votes: 0(Vote!) | Posted on Monday, September 12, 2005 - 4:45 pm: | |
Thanks Mama But I have to see wether this way can be used or not as I told u There are lots of servlets and JSP's where parameters are being passed. However I will try like this and see to change the code everywhere to this method Thanks |
Proofdada
Bewarse Legend Username: Proofdada
Post Number: 28218 Registered: 03-2004 Posted From: 195.3.113.150
Rating:N/A Votes: 0(Vote!) | Posted on Monday, September 12, 2005 - 4:42 pm: | |
sinnna ga chala simple ayyi vuntadi java loo ..try cheesi choodu.... |
Sinna
Celebrity Bewarse Username: Sinna
Post Number: 9588 Registered: 04-2005 Posted From: 68.226.157.141
Rating:N/A Votes: 0(Vote!) | Posted on Monday, September 12, 2005 - 4:42 pm: | |
Sree annayyi unte vachi helping ceyyyi |
Eeidlagolayenti
Kurra Bewarse Username: Eeidlagolayenti
Post Number: 769 Registered: 03-2005 Posted From: 66.121.23.130
Rating:N/A Votes: 0(Vote!) | Posted on Monday, September 12, 2005 - 4:42 pm: | |
e.g code String sql = null; String s = new String ("'Air Compressors' 'pens' 'car services'"); StringTokenizer stk = new StringTokenizer(s,"'"); while(stk.hasMoreTokens()) { String token = stk.nextToken(); StringTokenizer stk2 = new StringTokenizer(token," "); if ( sql != null ) { sql = sql + "AND"; } while(stk2.hasMoreTokens()) { String token2 = stk.nextToken(); if ( sql == null ) { sql = token2; } else { sql = sql + "OR" + token2; } } } |
Sinna
Celebrity Bewarse Username: Sinna
Post Number: 9587 Registered: 04-2005 Posted From: 68.226.157.141
Rating:N/A Votes: 0(Vote!) | Posted on Monday, September 12, 2005 - 4:40 pm: | |
But Finally all should be stored in a single variable itself... |
Sinna
Celebrity Bewarse Username: Sinna
Post Number: 9586 Registered: 04-2005 Posted From: 68.226.157.141
Rating:N/A Votes: 0(Vote!) | Posted on Monday, September 12, 2005 - 4:39 pm: | |
Ante like etla ante Air and Compressors ni oka chote store cheyyatamu taruvatha pens ni inko chota atla emaina unda easy ga? |
Sinna
Celebrity Bewarse Username: Sinna
Post Number: 9585 Registered: 04-2005 Posted From: 68.226.157.141
Rating:N/A Votes: 0(Vote!) | Posted on Monday, September 12, 2005 - 4:38 pm: | |
Ya aunu mama using that st.nextToken() I am able to get each word seperately But those have to be stored in some varible because that variable has to passed from servlet to other servlet a lot of time using getParameter() so the problem is how to store mama... |
Eeidlagolayenti
Kurra Bewarse Username: Eeidlagolayenti
Post Number: 768 Registered: 03-2005 Posted From: 66.121.23.130
Rating:N/A Votes: 0(Vote!) | Posted on Monday, September 12, 2005 - 4:37 pm: | |
StringTokenizer ani vuntundi.. using that you can get different tokens, which you can use to parse and create sql. |
Sinna
Celebrity Bewarse Username: Sinna
Post Number: 9584 Registered: 04-2005 Posted From: 68.226.157.141
Rating:N/A Votes: 0(Vote!) | Posted on Monday, September 12, 2005 - 4:32 pm: | |
Java lone kavali Servlet lo rayataniki Naku adi break chesi endulo store chesukunte Search Query rasethappudu easy ga untado cheppandi please... |
Proofdada
Bewarse Legend Username: Proofdada
Post Number: 28216 Registered: 03-2004 Posted From: 195.3.113.146
Rating:N/A Votes: 0(Vote!) | Posted on Monday, September 12, 2005 - 4:30 pm: | |
c++ loo aithe format loo/concat thoo solve cheyochu...java lo theldu... |
Sinna
Celebrity Bewarse Username: Sinna
Post Number: 9583 Registered: 04-2005 Posted From: 68.226.157.141
Rating: Votes: 2(Vote!) | Posted on Monday, September 12, 2005 - 4:27 pm: | |
Naku okka pedda problem vachi padindi Now Oka keyword that is entered by user to search undi anukondi For Ex 'Air Compressors' 'pens' 'car services' Idantha first oka string lo store chesukuni taruvatha parsing evevo chesi then Sql Query thoni database lo nunchi results testhunnanu Kani ikkad aOR Query vaduthunna for searching Like Air OR Compressors OR Pens OR Car OR Services I want the searh to be Air AND Compressors OR Pens OR CAR AND SERVICES Deeni kosamani nenu anukundi when parsing the string in a java servlet code using the Single Quote I can differentiate and find out wether AND should be applied or OR should be So I just wanted to know How to store the Broken KeyWords and what is to be used to store in java that is either HashTable or Vector or any other I am not able to understand how to store them so as to write databse queries Please help me immediately |