Fact Sheets and Brochures

All NMSU Fact Sheets: http://aces.nmsu.edu/pubs/howto/howto.html

Related NMSU Fact Sheets:
".mysql_error()); } $db_sel=mysql_select_db(MYSQL_DB); if (!$db_sel) { die ("Unable to select database:
".mysql_error()); } $query = "SELECT factsheets.id as fsid, factsheets.title as fstitle, fs_types.title as fstype, url FROM factsheets, fs_types, fs_versions where factsheets.id = fs_versions.fs_id and fs_versions.type_id = fs_types.id and active = 1 order by fs_versions.id, factsheets.title "; $result=mysql_query($query); $ls_id=-9999; $fs_url=-9999; $ls_title=-9999; $i = 0; $y = 0; $count = mysql_num_rows ($result); // echo $count; while($row = mysql_fetch_array($result)) { if($ls_id != $row['fsid']){ $i=0; if($ls_id!=-9999){ mysql_select_db('link'); $urlTemp = $fs_url; $urlTemp =str_replace("http://","",$urlTemp); $urlTemp =str_replace("www.","",$urlTemp); $urlTemp='http://www.'.$urlTemp; $str="SELECT distinct tags.tagId as tagId1,tag_name from tag_links, tags, tags_tag_links where tags_Id = tags.tagId and tag_links_Id = tag_links.tagId and tags.tagId in (SELECT tl.tagId as tl_ from tag_links,tags as tl,tags_tag_links where tags_Id = tags.tagId and tag_links_Id = tag_links.tagId and tag_links.link = '".$urlTemp."' and dl_ID =-9999) order by tagId1"; $current_result=mysql_query($str); //echo $str; echo "
"; while($row2=mysql_fetch_array($current_result)){ echo "".ucfirst($row2['tag_name']).''; } echo"
"; echo '
'; mysql_select_db(MYSQL_DB); } echo "
".$row['fstitle'].'
'; } if($i==0){ $fs_url = $row['url']; // first url in the group } $ls_id = $row['fsid']; //last factsheet id $ls_title= $row['fstitle']; // last factsheet title echo "".$row['fstype'].""; $i++; $y++; // echo $y; if($y>=$count ){ mysql_select_db('link'); $urlTemp = $fs_url; $urlTemp =str_replace("http://","",$urlTemp); $urlTemp =str_replace("www.","",$urlTemp); $urlTemp='http://www.'.$urlTemp; $str="SELECT distinct tags.tagId as tagId1,tag_name from tag_links, tags, tags_tag_links where tags_Id = tags.tagId and tag_links_Id = tag_links.tagId and tags.tagId in (SELECT tl.tagId as tl_ from tag_links,tags as tl,tags_tag_links where tags_Id = tags.tagId and tag_links_Id = tag_links.tagId and tag_links.link = '".$urlTemp."' and dl_ID =-9999) order by tagId1"; $current_result=mysql_query($str); //echo $str; echo "
"; while($row2=mysql_fetch_array($current_result)){ echo "".ucfirst($row2['tag_name']).''; } echo"
"; echo '
'; mysql_select_db(MYSQL_DB); } } mysql_close($db); ?>