|
|
if(request.Brand == 'All') {
|
}
else {
|
}
|
client.C3Desc = request.C3Desc;
if(client.Brand == 'All') {
cursor = database.cursor("select distinct c4desc from versitex.product where brand like '%' and c1desc like '" + unescape(client.C1Desc) + "' and c2desc like '" + unescape(client.C2Desc) + "' and c3desc like '" + unescape(client.C3Desc) + "' order by c4desc ");
cursor.next();
if(cursor.c4desc == '*') {
cursor1 = database.cursor("select sub from versitex.product where brand like '%' and c1desc like '" + unescape(client.C1Desc) + "' and c2desc like '" + unescape(client.C2Desc) + "' and c3desc like '" + unescape(client.C3Desc) + "' ");
cursor1.next();
var sub = 0;
sub = cursor1.sub;
cursor1.close();
cursor.close();
redirect("product.html?Id=" + sub + " ");
}
else {
write("");
}
}
else {
cursor = database.cursor("select distinct c4desc from versitex.product where brand like '" + unescape(client.Brand) + "' and c1desc like '" + unescape(client.C1Desc) + "' and c2desc like '" + unescape(client.C2Desc) + "' and c3desc like '" + unescape(client.C3Desc) + "' order by c4desc ");
cursor.next();
if(cursor.c4desc == '*') {
cursor1 = database.cursor("select sub from versitex.product where brand like '" + unescape(client.Brand) + "' and c2desc like '" + unescape(client.C2Desc) + "' and c3desc like '" + unescape(client.C3Desc) + "' ");
cursor1.next();
var sub = 0;
sub = cursor1.sub;
cursor1.close();
cursor.close();
redirect("product.html?Id=" + sub + " ");
}
else {
write("");
}
}
|