kupe
Technical User
- Sep 23, 2002
- 376
This (abbreviated) code brings up a list of current stories.
$result = @mysql_query("SELECT CONCAT(Headline, Byline, Newsdate, '<br>') AS Tale FROM StudentNews");
if (!$result) {
exit('<p>Error performing query: ' . mysql_error() . '</p>');
}
while ($row = mysql_fetch_array($result)) {
echo $row['Tale'];
}
I could use a hyperlink to go to a page with similar code that produces the full story.
But, Experts, is there a simpler php-way to do this, please?
$result = @mysql_query("SELECT CONCAT(Headline, Byline, Newsdate, '<br>') AS Tale FROM StudentNews");
if (!$result) {
exit('<p>Error performing query: ' . mysql_error() . '</p>');
}
while ($row = mysql_fetch_array($result)) {
echo $row['Tale'];
}
I could use a hyperlink to go to a page with similar code that produces the full story.
But, Experts, is there a simpler php-way to do this, please?