Jump to content
TNG Community
desiredbard

How to query DB and display on external page

Recommended Posts

desiredbard

Hi there

I have a photoalbum and TNG runnin g in two separate domains. my actual http://www.de-ridder.info hold basically some standard info and links and is no more than a OTT placeholder.

However

I do display the latest images from my photoalbum subdomain http://photoalbum.de-ridder.info in an image block on this start page .

I would love to have for example the latest three (updated) people and Places displayed on here as well

How do I query this I am a php newbe

(Basiqally how do I query and how do i "print" the result on the other page

Thanks a mil

Bas

Share this post


Link to post
Share on other sites
desiredbard

Anyone please

How would i query my last 5 updates

And get the result without formatting even

Share this post


Link to post
Share on other sites
Mark

Anyone please

How would i query my last 5 updates

And get the result without formatting even

Hi,

This should give you report showing the last 5 people 'changed' (updated) with birth & death places:

SELECT firstname, lastname, birthplace, deathplace, changedate FROM tng_people ORDER BY changedate DESC LIMIT 5

Not sure if this is what you are after..

Regards

Mark

Share this post


Link to post
Share on other sites
desiredbard

Hi,

This should give you report showing the last 5 people 'changed' (updated) with birth & death places:

SELECT firstname, lastname, birthplace, deathplace, changedate FROM tng_people ORDER BY changedate DESC LIMIT 5

Not sure if this is what you are after..

Regards

Mark

YES ( and no)

First of al the LIMIT does not work once removed the query

SELECT tng_people.living, lnprefix, prefix, suffix, tng_people.branch,lastname, firstname,DATE_FORMAT(tng_people.changedate,'%d %b %Y') as changedate_disp, tng_people.personID, tng_people.gedcom, nameorder FROM (tng_people ) ORDER BY changedate desc

Works fine,

With it there is an error...but no code description to it

I am a complete PHP newby...and of course i want to do to much at the same time.

I got my site in 3 parts : a www placeholder and 2 subdomains

The subdomains are for my photobook and genealogy site

Now the www placeholder holds two image blocks displaying my latest uploaded picture and lates created album

I would like to pull the bare (link) data from this report and display it on my placeholder

I dont know how else to describe it..... well maybe as a 5 item rss feed ?

Share this post


Link to post
Share on other sites
beun.net

I have kind of the same situation, and "solved" it like this...

I use a PHP script (magpie) that can parse RSS feeds.

I insert the TNG-feed of my http://genealogie.beun.net in that script, and display it on my "main" site http://beun.net (Just below the photographs on the right)

(On the left it shows today's birthdays using another script that can be found elsewhere on this forum).

(Check this thread on how to get the feed sorted in the right way:

http://www.tngforum.us/index.php?showtopic=1617)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×