Jump to content

Danny2k5

Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Danny2k5's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Right my query will show "There are 4 results in the download section" after a search but underneath it says "No Results, can anyone see anything wrong with my code? [code]$SEARCH_DOWN_ARRAY = array(); $download_query = @mysql_query("SELECT * FROM ti_downloads WHERE d_title LIKE '%$search%' OR d_small_description LIKE '%$search%' OR d_long_description LIKE '%$search%'"); $num_downloads = @mysql_num_rows($download_query);         $dow = @mysql_fetch_array($download_query); $SEARCH_DOWN_ARRAY[] = array( "title" => '<a href="/index.php?action=downloads&cat=' . $catid . '&file=' . $dow["id"] . '" title="' . htmlentities($dow["d_title"]) . '">' . htmlentities($dow["d_title"]) . ' by ' . htmlentities($dow["d_creator"]) . '</a>', "creator" => htmlentities($dow["d_creator"]) ); $smarty -> assign("NUM_DOWNLOADS", $num_downloads); $smarty -> assign("SEARCH_DOWN_ARRAY", $SEARCH_DOWN_ARRAY); $smarty -> assign("THE_INCLUDE", $smarty -> fetch(SROOT . "templates/search.tpl")); } [/code] Then the template looks like: [code]                                {section name=down loop=$SEARCH_DOWN_ARRAY}                                 {$SEARCH_DOWN_ARRAY[down].title}<br />                                 {sectionelse}                                 No Results                                 {/section} [/code] Thanks People Dan
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.