- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
<?php
// ...
if(!empty($_GET['hit']))
{
$tovar2 = mysql_query("select * from `product` where `hit`='1' ORDER BY `weight` DESC, `id` asc ");
}else{
if(!empty($_POST['cena']) && !empty($_POST['meh']) && !empty($_POST['razmer']))
{
$tovar2 = mysql_query("select * from `product` where `new`<'".$_POST['cena']."' and `kat`='".$_POST['meh']."' and `razmer` like '%".$_POST['razmer']."%' ORDER BY `weight` DESC, `id` asc limit $start, $num;");
}
elseif(!empty($_POST['cena']) && !empty($_POST['meh']) && empty($_POST['razmer']))
{
$tovar2 = mysql_query("select * from `product` where `new`<'".$_POST['cena']."' and `kat`='".$_POST['meh']."' ORDER BY `weight` DESC, `id` asc limit $start, $num;");
}
elseif(!empty($_POST['cena']) && empty($_POST['meh']) && !empty($_POST['razmer']))
{
$tovar2 = mysql_query("select * from `product` where `new`<'".$_POST['cena']."' and `razmer` like '%".$_POST['razmer']."%' ORDER BY `weight` DESC, `id` asc limit $start, $num;");
}
elseif(empty($_POST['cena']) && !empty($_POST['meh']) && !empty($_POST['razmer']))
{
$tovar2 = mysql_query("select * from `product` where `kat`='".$_POST['meh']."' and `razmer` like '%".$_POST['razmer']."%' ORDER BY `weight` DESC, `id` asc limit $start, $num;");
}
elseif(!empty($_POST['cena']) && empty($_POST['meh']) && empty($_POST['razmer']))
{
$tovar2 = mysql_query("select * from `product` where `new`<'".$_POST['cena']."' ORDER BY `weight` DESC, `id` asc limit $start, $num;");
}
elseif(empty($_POST['cena']) && !empty($_POST['meh']) && empty($_POST['razmer']))
{
$tovar2 = mysql_query("select * from `product` where `kat`='".$_POST['meh']."' ORDER BY `weight` DESC, `id` asc limit $start, $num;");
}
elseif(empty($_POST['cena']) && empty($_POST['meh']) && !empty($_POST['razmer']))
{
$tovar2 = mysql_query("select * from `product` where `razmer` like '%".$_POST['razmer']."%' ORDER BY `weight` DESC, `id` asc limit $start, $num;");
}
// ...
?>