clarify my question 2 Answer(s) 2 years and 11 months ago
Posted in : Java Beginners
Dear Sirs/Expert,
Thanks for writing back.
Yes. I want a page to use id of parents to do the search for the match.
So, after enter the id of the parent into the search box, the table will display the matching tutors to the parent.
I was telling you that my degree is not a field on its own, it is under a drop down list where there is different types of qualification like degree, master, PHD etc.
So, if there is a tutor that match the parent requirements like qualification, subjects that the tutor can teach and the locations for example, there will be a table that display the following:-
so, there might be different tutors that can match this parent's requirements and all the tutors' name, address, location, id and contact will be displayed to me.
The idea is that I need to find a match for the parent.
Is it have to use hibernate in order to achieve the above?
Thank you for your kind patience. I really appreciate it.
View Answers
June 17, 2010 at 4:08 PM
Hi Friend,
Try the following code: <%@page import="java.sql.*"%> <form> Enter ID:<input type="text" name="id"><input type="submit" value="Submit" style="background-color:#49743D;font-weight:bold;color:#ffffff;"> </form> <%String id=request.getParameter("id"); if(id!=null){ Class.forName("com.mysql.jdbc.Driver"); Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/mysql", "root", "root"); Statement st=connection.createStatement(); ResultSet rs=st.executeQuery("SELECT * FROM parents where parentsID='"+id+"'"); %> <table border="1"> <tr><th>Parents ID</th><th>Name</th><th>Contact No</th><th>Location</th><th>Tutors ID</th><th>Name</th><th>Contact No</th><th>Location</th></tr> <% String sub="",qua=""; while(rs.next()){ sub=rs.getString("strSub"); qua=rs.getString("strtutorType"); } ResultSet res=st.executeQuery("SELECT * FROM parents,tutors WHERE tutors.strSubt = '"+sub+"' and tutors.strQualificationt = '"+qua+"' and parentsID='"+id+"' "); while(res.next()){ %> <tr><td><%=res.getString("parentsId")%></td><td><%=res.getString("name")%></td><td><%=res.getString("contactNo")%></td><td><%=res.getString("strLocation")%></td><td><%=res.getString("tutorsId")%></td><td><%=res.getString("tname")%></td><td><%=res.getString("tcontactNo")%></td><td><%=res.getString("strLocation1")%></td></tr><% } } %> </table>
Thanks
June 17, 2010 at 4:13 PM
For the above code, we have created following database table:
clarify my question - Java Beginners clarifymy question Dear Sirs/Expert,
Thanks for writing back.
Yes. I want a page to use id of parents to do the search for the match.
So... the matching tutors to the parent.
I was telling you that my degree
Please clarify my doubt
Please clarifymy doubt /here is my sample code for deadlock/
class A
{
synchronized void foo(B b)
{
String name...[] args)
{
new Deadlock();
}
}
Myquestion is that class A has 2
Clarify my last question's answer - Java Beginners Clarifymy last question's answer Dear expert,
I've tried out... did not specify myquestion too clearly.
Here's my 2 database... and parents contain other fields like name, address, email, contact numbers etc.
My
Clarify my doubt - JSP-Servlet Clarifymy doubt Hi All,
Although i know the concept of Servlet & JSP, but I have never got a chance to work in EJB . So could u please tell me how to create web Project in netbeans and deploy it in tomcat AND/OR creating a web
clarify date class - Java Beginners clarify date class Dear,
clarify this question...
"Develop Date class in Java similar to the one available in java.util package. Use JavaDoc comments."
Give me the source code and explain how to create classes similar
my question my question "Write a C/C++ program to show the stored procedure PROCRESETMAIL" on database "USER_NOTIFY
my question my question "Write a C/C++ program to show the stored procedure PROCRESETMAIL" on database "USER_NOTIFY
clarify bt/w service() and doget/dopost() clarify bt/w service() and doget/dopost() Dear friends, i ve question regarding service()and doget/dopost.. the container calls service() where it does the service for the request so then wat is the role of doget/dopost plz
my question - EJB my question is it possiable to create web application using java beans & EJB's with out implementing Servlets and jsps in that java beans and EJB's
solve my question shortly
solve myquestion shortly <html>
<head>
<script>
function checkphoneNumber(number){
if(/[^\d ]/.test(number)){
alert('It should contain numbers [0-9] only!');
document.getElementById
my question is related to my project viz myquestion is related to my project viz Sir, my project is based on MR tracking system developed using struts framework, it has been developed in Net Beans the whole project is working except a jsp page named dayplan.jsp
Question Question When there is an exception in my program how java runtime system handles
question
question dear sir/madam
myquestion is how to compare two text format in java..we are java beginners..so we need the complete source code for above mentioned question...we have to compare each and every word
question
question Dear sir
i had some typing mistake at previous question
so its my humble request to let me know the steps to start the tomcat6 under the tomcat directory
question
question Sir ,
i have a starting trouble to start my search engine project , please help me to start my project , please send me some relevant java codes
QUESTION
QUESTION please atach java tutorial to my email
Hello Friend,
Please visit the following link:
Java Tutorial
Thanks
question
question i am using this code in my project
response.sendRedirect("LoginForm1.jsp?msg=Username or Password is incorrect!");
but i wan't to hide this message from url.please help me
question
question Sir,
how to display web snippets for a perticular query
for eg:web snippets for apple
how to implement this concept in my java project
please help me
question
question i need to mark employees as half day absent who came after 10'o clock in my web project,so i need to know who are all late entry.if you have any idea using jsp and mysql please help me
question
question Sir,
i am developing a video streaming PC server to j2me client system that the j2me player can playing video from PC server .if have any code for video streaming then send to my email address as soon as possible
Question? Question? Myquestion is how to:
Add a menu bar to the program with a File menu.
In the File menu, add a submenu (JMenuItem) called About.
When the user clicks on the About menu item, display a JOptionPane message dialog
question
/) is not available.**
how tdo i solve this.please help me to run my project
please give
question
question i am using this code in my project
response.sendRedirect("LoginForm1.jsp?msg=Username or Password is incorrect!");
but i wan't to hide this message from url.please help me.
you gave me the response Hi Jamsiya
question
question following is my code to sent mail but i couldn't work with eclipse ,that have some errors .need i any set up in eclipse or tell to what can i do to work code properly.
<%@ page import="java.io." import="java.lang.
question
;/tr>
</table>
this is my jsp page
package servlet;
import java.io.
Regarding My 3rd Question in Java - Swing AWT
Regarding My 3rd Question in Java sir in Netbeans By default JTable Columns will appear Horizontal like
Title1 Title2 Title3 Title4
in below these our data will appear so myquestion that is there any method
Some additions for my previous question - Java Beginners
Some additions for my previous question This is the question I posted several hours ago:
"I'm trying to write a program that has a text field... for the GUI. Could anyone please help?"
So my other two questions are:
1
to know my answer
to know my answer hi,
this is pinki, i can't solve myquestion "how to change rupee to dollar,pound and viceversa using wrapper class in java." will u help me
PLEASE HELP WITH MY JAVA
PLEASE HELP WITH MY JAVA Hey my name is Gavin and im a student at school that takes IT. my teacher has gave me a problem and i can't figure it out please help!!!!!!!!
it is a for-loop question:
Display the first 5 multiples
Further advice needed on my last question - JSP-Servlet
Further advice needed on my last question Dear Experts,
I refer to your last solution regarding my matching codes.
After I tried out your... errors
Here are my codes which I modified but basically followed your logic
Paypal integration to my website - Struts
the payment details(acknowledgement)....Myquestion is.....instead of getting...Paypal integration to my website Hi there,
I am working on paypal.My question is....I have one webiste and in that I kept a button called
Netbeans Question.
Netbeans Question. Ok here is my code-
*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import...]);
}
}
}
This is what I am trying to get my program to due- using a two-dimensional array
Android Question
Android Question how can i use pre-defined table in my application
Zend question
Zend question How to change action in zend framework??
suppose i want to add data in DB so my logic is that form view code in my indexAction() and insert process in addAction so how to go addAction() part in cilck on submit
java question
java question i have a string like "My name is arvind.i live in bangalore.i study in college.".the problem is that i hav to break this string into three seperate lines
Jdbc Question
Jdbc Question Hi.
In Jdbc, if i am pointing to the database of some other machine, i mean instead of local-host i give the ip of that machine and that machine is shut down, Will my connection still work
JAVA QUESTION
THE DYNAVALIDATORACTIONFORM THIS WILL BE SUCCESFULL.
NOW MY REQUIERMENT IS TO GET DATA FROM DATABASE
servlet question
servlet question sir please provide a web apps program in which it has a button through which i can download my uploaded image.
Here is a code to upload and download the file.
1)page.jsp:
<%@ page language="java
Addition to my previous post - Java Beginners
Addition to my previous post Addition to my previous question about the address book program.
I need to have separate classes:
CmdLineAddressBook.java
AddressBook.java
Contact.java
Address.java
Name.java
Query Question 2
Query Question 2 Want to displays the name and ID of all departments with the names of the employees in that department. SELECT * FROM employee is my result
question about database question about database sir i have made a drop down button using html..now i want to retrieve values from database so that they my appear in my drop down button..how can i do this....i have taken many fields such as type,ward id
doubt in my program code - Java Beginners
doubt in my program code i have developed a web browser with the help of standard widget toolkit(swt) and java. i creted some buttons such as GO... we can see as the name of all the buttons.my question is i need to change
My Base Class is Changing every time in my code. How I can overcome this? My Base Class is Changing every time in my code. How I can overcome this? I have had the below question asked in interview, i'm curious to learn... by Generator. The question I was asked was about creating a new base class
question question sir plz tell me what should i give in title box. just i want java program for the question typed in this area
question question sir plz tell me what should i give in title box. just i want java program for the question typed in this area
string related question
string related question *q.1>how i dispaly the reference of string variableS ?
eg:-String s1="my name";
Sring s2="your name";
here what is address of variable s1 and s2
This Question was UnComplete - Java Beginners
This Question was UnComplete Implement a standalone procedure to read in a file containing words and white space and produce a compressed version... preserve lines. Hi Alhisnawy,
Below is my version of code. Hope it fulfills