- 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;");
}
// ...
?>
bormand 30.01.2013 19:55 # 0
myaut 30.01.2013 21:32 # +3
eth0 30.01.2013 20:55 # +2
movaxbx 30.01.2013 21:15 # 0
roman-kashitsyn 30.01.2013 21:19 # +1
Lure Of Chaos 31.01.2013 00:32 # 0
guest 01.02.2013 02:42 # 0
bormand 01.02.2013 05:35 # +5