Jul 28, 2005 #1 mhburney Programmer Jul 26, 2005 23 PK Hi, I cant figure out a way to search through a table for a specific value using JDBC and mysql.. any helps! cheers!
Hi, I cant figure out a way to search through a table for a specific value using JDBC and mysql.. any helps! cheers!
Jul 28, 2005 #2 Diancecht Programmer Jan 8, 2004 4,042 ES select * from your table where yourfield=yourvalue? Cheers, Dian Upvote 0 Downvote
Jul 28, 2005 Thread starter #3 mhburney Programmer Jul 26, 2005 23 PK Okat this is what iam trying but how am i suppose to check the value or the result of this query s.executeQuery ("Select name from device where name='xyz'"); Upvote 0 Downvote
Okat this is what iam trying but how am i suppose to check the value or the result of this query s.executeQuery ("Select name from device where name='xyz'");
Jul 28, 2005 #4 Diancecht Programmer Jan 8, 2004 4,042 ES I don't think I understand the question. The query returns a ResultSet, then you can iterate through it ang get the data you need. Cheers, Dian Upvote 0 Downvote
I don't think I understand the question. The query returns a ResultSet, then you can iterate through it ang get the data you need. Cheers, Dian
Aug 1, 2005 Thread starter #5 mhburney Programmer Jul 26, 2005 23 PK you mean just use resultset.next until it == somestring. Upvote 0 Downvote
Aug 1, 2005 #6 Diancecht Programmer Jan 8, 2004 4,042 ES For example: http://www.fluffycat.com/java/JavaNotes-ResultSet.html Cheers, Dian Upvote 0 Downvote