jajaja gracias por tu ayuda pero estoy muy guey jajaj porq ahora lo q no me jala son todo los precios :s mi codigo es:
Código:
String SQLString = "SELECT TOP 10 * FROM conceptos";
if (request.getParameterValues("clave").length > 0 ) {
SQLString = "SELECT * FROM conceptos WHERE clave IN (";
for (String s : request.getParameterValues("clave")) {
SQLString += "\'" + s + "\', ";
}
SQLString = SQLString.substring(0, SQLString.lastIndexOf(',')) + ")";
}
try { tabla = instruccion.executeQuery(SQLString);
while (tabla.next()) {
float precio = tabla.getFloat(3);
String [] valores = request.getParameterValues("cantidad");
for (int i = 0; i < valores.length; i++)
{
int cantidad = Integer.parseInt(valores[i]);
float total = precio * cantidad;
out.println("PRECIO:"+precio+"");
out.println("cantidad:"+cantidad+"");
out.println("total:"+total+"");
}
y me imprime:
PRECIO:10.0 cantidad:3 total:30.0
PRECIO:10.0 cantidad:1 total:10.0
PRECIO:10.0 cantidad:2 total:20.0
cuando segun las claves q consulte precio deberia de ser 10.00, 20.00 y 30.00