For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > November 2006 > Re: [PHP-DB] Generating pages with full stories









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] Generating pages with full stories
J R

2006-11-13, 9:56 pm

Here's how you should do this (IMHO):

On you front page make a sql query say you want to display the latest 3
events. Your query probably will look like this:

select event_table_id, title from event_table order by date_created desc
limit 3;

then from the result make a while or for loop (for example your result is
stored in an array $aResult)

foreach ($aResult as $value) {
echo '<a
href="eventFullStories.php?eventId='.$value['event_table_id'].'">'.$value['title'].'</a>;
}


Then on your eventFullSyories.php just query the event_table for that
eventId and display the event full story.


hth,
john

On 11/14/06, dancemaniac@edsamail.com.ph <dancemaniac@edsamail.com.ph>
wrote:
>
> I'd answer question number 3.
>
> Well, it is just about an update section that the administrators will
> input on the database for updates and event for a company, saying the
> website has an updated page or simply putting an "event" for the public to
> know.
>
> Right now, I want to know how get a URL like this:
>
> http://www.myhomepage.com/thispage....e_X&?var2=val_Y
>
> Using anchor (link) tags, not from form tags.
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



--
GMail Rocks!!!

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com