I know that this will sound weird but just go along with it for awhile and things will make sense...
I need to find out 2 things:
1) Getting field names (for a php page that will be dealing with various types of SELECT queries)
2) Traversing the records NUMERICALLY
Here's why:
I wrote a fairly kewl templating engine/scheme with Perl and DBI that allowed me to construct my own templates for the page, the table, and records. I've got the page part working in PHP and the table part I think I can handle however, I am looking at trying to get my PHP template engine to operate the same way as my Perl engine so I can continue to use the templates that I've already made.
To give you an idea of what the templates look like and the finished result, look here:
Page template
Table template
Record template
Combined templates
(for some reason I can't get that last link to .... link, so just cut and paste into a browser)
As you can see, the tokens correspond to the fields as they appear in the order of each other.
I need to be able to do field traversals of a recordset like as if it was an array...all the PHP books I have refer to fields with their field names (which would work on a case by case basis) but I want 1 script to work in most if not all cases. Thinking about it, it would be safer to use the field names as tokens but, hend-sight is 20-20.
Any help is greatly apprechiated.
TIA
Sean Shrum