PDA

View Full Version : Read data from custom table and display


Exeter
11-04-2009, 05:04 AM
I am working on simple scenario

- new table in the DB with record
- add a page to the form
- display each record in a forach loop (using a template/several)

That's pretty straight forward using just PHP. Probably in VBulletin too, but I am not good enough yet.

Can you please help me define the workflow (high level step by step) of what I have to do?
I think I have to create a whole number of artifacts, including a plugin?

Thanks

Exeter
11-09-2009, 12:05 AM
I figured this one out. The answer is "Understand the PHP execution model".

First, create a php file that generates your html. The html itself is in one or more templates. The php file calls/instantiates the templates. When and where is up to you.

In my case the php file first does a DB call, invokes a foreach loop that instantiates a template for each record, and then calls the main template.