You are totally right. I guess that was a generalization, its just alot of PHP and ASP 
programmers code that way....

clay


-----Original Message-----
From:   Turner, John [SMTP:[EMAIL PROTECTED]]
Sent:   Wednesday, July 03, 2002 8:43 AM
To:     'Tomcat Users List'
Subject:        RE: updating records in a Mysql db using jsp.


What technology you use (JSP, ASP, PHP, CF, perl, whatever) is irrelevant to
"three tier philosophy" (which should really be "n-tier philosophy" if you
want to get technical).  Application architecture is not language or
application server dependent.

John Turner
[EMAIL PROTECTED]
http://www.aas.com


-----Original Message-----
From: Clay Graham [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 03, 2002 11:36 AM
To: 'Tomcat Users List'
Subject: RE: updating records in a Mysql db using jsp.


is this a JSP page? I always thought three teir philosophy strictly forbade 
this type database handling on a JSP page, these are jakarta tags?

well I guess tomcat can be many things to many people, including a PHP or 
an active server page....


clay



-----Original Message-----
From:   Kevin Passey [SMTP:[EMAIL PROTECTED]]
Sent:   Wednesday, July 03, 2002 6:45 AM
To:     'Tomcat Users List'
Subject:        RE: updating records in a Mysql db using jsp.

Sorry that should be DB2/400.

Kevin

-----Original Message-----
From: Maarten van Heiningen [mailto:[EMAIL PROTECTED]]
Sent: 03 July 2002 14:42
To: [EMAIL PROTECTED]
Subject: updating records in a Mysql db using jsp.


Hi,

I am using a mysql db with jdbc on a win2000 server with Tomcat. I wonder
how I can update or delete items in a row or delete a complete row. I can
select the specific data in the table and put it on the webpage, but I also
want to edit this selected item.

any sugestions?

Maarten

sample code:

<%@ taglib uri="http://jakarta.apache.org/taglibs/dbtags"; prefix="sql" %>

<%-- open a database connection --%>
<sql:connection id="conn1">
  <sql:url>jdbc:mysql://localhost/producten</sql:url>
  <sql:driver>org.gjt.mm.mysql.Driver</sql:driver>
</sql:connection>

<%-- open a database query --%>
<form name='form'>
<table>
<sql:statement id="stmt1" conn="conn1">
  <sql:query>
    SELECT manuf, type, prijs FROM mobile WHERE
manuf='<%=request.getParameter("manuf") %>' AND
type='<%=request.getParameter("type") %>'
    order by 1
  </sql:query>
  <%-- loop through the rows of your query --%>
  <sql:resultSet id="rset2">
    <tr>
      <td><sql:getColumn position='1'/></td>
      <td><sql:getColumn position='2'/></td>
      <td><input type="text" name="price" size="20" value="<sql:getColumn
position='3'/>"/></td>
      <td><input type="button" name="submit" value="update" onClick="
      UPDATE mobile SET prijs = ' + price + ' WHERE manuf = ' + manuf + '
AND type = ' + type + '"
      /></td>
    </tr>
  </sql:resultSet>
</sql:statement>
</table>
</form>


<table width='100%'>
        <hr height='2'/>
</table>


<%-- close a database connection --%>
<sql:closeConnection conn="conn1"/>


Disclaimer

This communication together with any attachments transmitted with it ('this
E-mail') is intended only for the use of the addressee and may contain
information which is privileged and confidential. If the reader of this
E-mail is not the intended recipient or the employee or agent responsible
for delivering it to the intended recipient you are notified that any use 
of
this E-mail is prohibited. Addressees should ensure this E-mail is checked
for viruses. The Carphone Warehouse Group PLC makes no representations as
regards the absence of viruses in this E-mail. If you have received this
E-mail in error please notify our ISe Response Team immediately by 
telephone
on + 44 (0)20 8896 5828 or via E-mail at [EMAIL PROTECTED] Please then
immediately destroy this E-mail and any copies of it.

Please feel free to visit our website:

UK
http://www.carphonewarehouse.com

Group
http://www.phonehouse.com



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to