MySQL database altering help

Discussion in 'MySQL' started by OreoKnight, Feb 13, 2008.

  1. #1
    So I don't really know that much about programming and changing stuff for my database so I was wondering if you guys could help me out. My previous question of how to back it up was answered so I'll let you guys have a shot at these questions.

    1) After you select a subdir for articles is shows them in the order of oldest to newest. How do I change that? I want them to always show the newest articles first
    2) Is there a way to insert links into the script which creates the navbar on the left (check the source code) (Maybe a hidden type attribute or a way to insert the links directly in somehow?)
    3) Can I hide navbar links so I create content in a certain category but not have it listed on the main page (as to create artificial subcategories)

    If someone thinks they know how to do this or is willing to work with me I might have to give you some sort of reward, hmm say $50(if you can change it to my specificiations and give a little tutorial on how to do future mods if I need to)(I'd post it in the services section if I could, but its urgent) (There will only be one winner, and they must meet my expectations)My site is in my signature. If you have any thoughts or ideas please share. And as always thanks for your help!
     
    OreoKnight, Feb 13, 2008 IP
  2. LittleJonSupportSite

    LittleJonSupportSite Peon

    Messages:
    386
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Without seeing the code in your program I cannot say how to fix it.

    However if this reading from a DB then you can use a simple order desc in your sql line and it will reverse the order.

    Using CSS and some php you can do #2 and #3
     
    LittleJonSupportSite, Feb 13, 2008 IP
  3. OreoKnight

    OreoKnight Peon

    Messages:
    95
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    So here is the code on the index page.... now say I wanted to insert a link in the middle of all that; however, I want it to go to a static url or I would have just created another category. What I want to create is an exercise link (I know it exists but its really not how I want it setup). This will be a php page that shows a list of all the exercises I can think of. It will be like chest, back, bis, tris, ect. and under each of those I want it to automatically print a list of the exercise articles I create for each of those subtopics (this way I can add a chest exercise and it will automatically appear here) The problem with this is if I add another general topic it will print this in the navbar as well. Does this make a bit more sense?

    <?



    // get categories



    $sql = mysql_query("select * from categories where id != 1");



    $count = mysql_num_rows($sql);







    if($count > 0){



    while($row = mysql_fetch_assoc($sql)){



    $name = $row['name'];



    print '<a href="c.php/'.$name.'/" style="margin-top: 2px; font-size: 12px; font-family: verdana">'.$name.'</a><br />';



    }



    }



    else{



    print 'There are currently 0 categories. Please login to your admin panel to manage categories.';



    }



    ?>
     
    OreoKnight, Feb 13, 2008 IP