Koera CV
Sorteeri tõu järgi kahanevalt
'; } elseif($_GET['sorteeri']=='toug-al'){ $order=' ORDER BY wdbr.breed DESC'; echo 'Sorteeri tõu järgi kasvavalt
'; } else { $order=' ORDER BY wdbr.breed ASC'; echo 'Sorteeri tõu järgi kahanevalt
'; } $queryuserdogs = mysql_query('SELECT wdb.sex, wdb.lifestyle, wdb.color, wdb.description, wdb.location, wdb.owners_id, wdb.vaccine, wdb.owners_address, wdb.show_cv, wdb.dog_pregnant, wdb.microchip, wdb.allergies, wdb.nutrition_info, wdb.dog_picture, wdb.id, wdb.dog_name, wdb.dog_weight, wdb.dog_age, wdbr.breed FROM wp_dog_base AS wdb INNER JOIN wp_dog_breed AS wdbr ON wdb.dog_breed=wdbr.id WHERE owners_id="'.$userid.'" AND show_cv="1"'.$order.'') or die(mysql_error()); if(mysql_num_rows($queryuserdogs)!=0){ while($row = mysql_fetch_array($queryuserdogs)){ if($row['show_cv']==1){ $dogid=$row['id']; echo ''; echo '
Koera saavutused
'; $querydogevents = mysql_query('SELECT * FROM wp_dog_events WHERE dog_id="'.$dogid.'" ORDER BY event_date DESC'); if(mysql_num_rows($querydogevents)!=0){ while($row = mysql_fetch_array($querydogevents)){ echo ''; } echo ''; } } } else { echo 'Kasutaja on otsustanud, et ei jaga oma koerte/koera informatsiooni!'; } //echo $iscurrent; ?>