Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help connecting to mysql database

 
david halewood
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got this ervlet off of coreservlets.com but want to change it so instead of each catalogItem being typed in it gets the infomation from mysql database:


I have made this code below which gets data from mysql tables, at the moment i use it as a simple search but is there a way to merge the two together so the above code gets it catalogItems by using the select statement like in the code below?

Any help at all would be really helpful as i am really finding this hard, if you go to http://volume1.coreservlets.com/archive/Chapter9.html you can see the other files for how the catalog works. Again any help would be helpful this is very stessing lol

[ December 29, 2006: Message edited by: david halewood ]
[ December 29, 2006: Message edited by: david halewood ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David,
JavaRanch tip:

If you are going to post more than a line or two of your code, wrap that
code in a set of UBB Code tags.
Doing so will help to preserve your code's indenting, making it easier to read.
If it is easier to read, more people will actaully read it and you will
stand a better chance of getting help with your question.
See UseCodeTags for more
help with UBB code tags.

I was going to add them for you but when attempting to do so, I noticed that the code has no indenting.
You can edit your post by clicking on the
link.
 
david halewood
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I came up with the above solution but it still does not work fully i have been told i need to add the item to a array during the first for loop, i called the array addedItem but do not know how to add the item to it can any body help me?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic