Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Hent nyeste indlæg fra database
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Hans Lommeuld  
View profile   Translate to Translated (View Original)
 More options May 15 2012, 2:27 am
Newsgroups: dk.edb.internet.webdesign.serverside.php
From: Hans Lommeuld <hanslomme...@gmail.com>
Date: Mon, 14 May 2012 23:27:48 -0700 (PDT)
Local: Tues, May 15 2012 2:27 am
Subject: Hent nyeste indlæg fra database
$sql = "SELECT * FROM navn ORDER BY dato DESC";
                 $result = mysql_query($sql);

                 while($row = mysql_fetch_array($result)){
                     echo date('d-m-Y',$row['dato']);
                     echo '<p>';
                     echo $row['overskrift'];
                     echo '</p>';
                     echo '<p>';
                     echo $row['tekst'];
                     echo '</p>';

anførte kode henter og udskriver samtlige poster fra databasen med
dato, overskrift og tekst.

Hvordan helt konkret skal jeg gøre, hvis jeg kun ønsker at udskrive
sidste indlæg helt automatisk?

Hilsen

Hans Lommeuld


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.