Jump to content

starkplastic

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Everything posted by starkplastic

  1. Hi, I'm trying to figure out how to logically display the latest posts except for the latest post. I.e. displaying the top five posts excluding the latest one. Can anybody help me with this code or do you have a better solution? $query = "SELECT id, date, title, post FROM news_posts WHERE ID!=$topid ORDER by date DESC limit 5"; $topid = mysql_query("SELECT id FROM news_posts ORDER by date DESC 1"); cheers
  2. thanks for the comments, I have made the changes and redone alittle.
  3. The first thing that I noticed from a design point of view, is the 90's feeling. - Whats up with the black bird against the black background? -In your CSS file you have a variation in font face for different tags, this is not so popular. -Why have css in your php file when you have got a stylesheet? Overall the page screams a feeling of the 90's and movies such a Ken Park, 1 mile and etc. I see that you understand the tags and everything but the composition is sloppy and "so so". Give everything attention and less is more.
  4. Hello, I was going for a clean and spacious look. The page is css and xhtml compliant. Please give me constructive criticism that can improve the site. http://alexofsweden.rymdraket.net Thanks http://alexofsweden.rymdraket.net
  5. Hi, I'm trying to sort my posts so that they are grouped and seperated for every month. For example all december posts will be grouped togther and given a header with the name december, and etc for the other months. <?php include ('connect.php'); $months = array(1 => "january", 2 => "february", 3 => "March", 4 => "April", 5 => "May", 6 => "June", 7 => "July", 8 => "August", 9 => "September", 10 => "October", 11 => "November", 12 => "December"); for($i = 12; $i > 0; $i--) { echo "<h2>" .$months[$i] ."</h2>"; (row 29->)$sql = mysql_query("SELECT DATE_FORMAT(date, '%n') AS manad, date, title FROM news_posts WHERE MONTH(manad)= '$i'"); while ($row = mysql_fetch_array($sql, MYSQL_ASSOC)) { echo $row['title']; echo $row['date']; } } ?> All I get is: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/alexofsweden/public_html/archive.php on line 29. If there is another solution to my problem that is easier, share it please
×
×
  • 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.