Jump to content

Rama

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Rama's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. THANKS... THAT WORKED..FINE... YOUR HELP WAS MUCH APRECIATED
  2. guys i cant get to work a this pagination code. this source code, has not been taken from phpFreaks, but maybe someone can help me out, cause im getting really mad with this.. First, i have 3 categories in my download script. 1rst. LAW1 2nd. LAW2 3rd. OTHERS and i make a diferent page for each categorie, for example law1.php and law2.php the problem is that each page is counting the global number of pages.. for example. I have 60 downloads in each category, and i set the number of results per page to 30, but i go to law1.php and shows me 6 links, that is to say that shows me the 2 of law1 and the 2 of law 2 and the other 2 from others, instead of showing 2. you undertand ? the scripts must show me only 2 pages per categorie, but instead shows me 6... in each page i have something like this : [code] html code ///// and here comes the php stuff <? include("dbconnect.php"); $limit = 30; $indexlimit = 5; if(!$_GET[page]) $_GET[page]=1; $start = ($_GET[page]-1)*$limit; function pagelinks($ispage=1,$getme = "order by id DESC"){ global $limit;     $indb = mysql_numrows(mysql_query("SELECT * FROM downloads $getme"));     $pagenumber = $indb / $limit;     $pagenumber++;     $pagecnt=1;     while($pagecnt <= $pagenumber)         {         if($pagecnt == $ispage){echo "[ $pagecnt ] ";}         else{echo "<a href=\"?page=$pagecnt\" target=_self>$pagecnt</a>\n ";}         $pagecnt++;         } } $result = mysql_query("select * from downloads WHERE category = 'law1' order by id DESC limit $start,$limit"); while($r=mysql_fetch_array($result)) {           $id=$r["id"];    $title=$r["title"];    $date=$r["date"];    $link=$r["link"];       //display the row echo ("$date - <a href='download.php?id=$id'>$title</a><br>"); } echo"<br>Page: \n"; pagelinks($_GET[page]); ?> ///////////// more html here and page ending[/code] Please any help is much apreciated....
  3. well guys.. I know some basic Php, and Mysql, but not much. Im creating a small download script for my law Site, ( im studying law ) nothing important, its something really basic, that will help me to update the site easily... 1 question : Is it better or faster to host images on MySQL ? or is it better to upload them to my site, and just enter the url in the database ? 2 question : While i work with categories for downloads, what is better, to create a table for each category, or put them all toghether in one table by using a "categorie" fiels in the database ???? any help, will be much apreciated, and sorry if my english is not so good .... im from argentina... thanks in advance-- [img src=\"style_emoticons/[#EMO_DIR#]/wink.gif\" style=\"vertical-align:middle\" emoid=\":wink:\" border=\"0\" alt=\"wink.gif\" /] [img src=\"style_emoticons/[#EMO_DIR#]/wink.gif\" style=\"vertical-align:middle\" emoid=\":wink:\" border=\"0\" alt=\"wink.gif\" /]
×
×
  • 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.