Forums Register Login

help connecting to mysql database

+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send


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?
Amateurs built google. Professionals built the titanic. We can't find the guy that built this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1286 times.
Similar Threads
Storing of Data
two dropdown menus
How to create shopping cart and store multiple items in it using servlets and session tracking
jsp:compare select statement error
cookies problem
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 15:46:25.