Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

sections

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
twopeak
Smarty Rookie


Joined: 09 Jun 2003
Posts: 12

PostPosted: Wed Jul 02, 2003 2:55 am    Post subject: sections Reply with quote

Hello...

I made ascript that allowed me to have full control over 3 tables of a mysqldatabasase.
Now I would like to change this script so it fits in my smarty-driven website...

The problem is this:
I do not know how many fields there will be,
I do not know the name of the fields (when making the temlate file).

When I execute the script, with mysql_get_fields I get the names of the fields, but I need the names of the fields in the template, when I create it, to make a section.

so I have something like an adresbook (name, adres, phone, ...) and an appointments calendar (event, date, time, place, ...) and a table with news (message, writer, date, ...)
I want to output a table with all the field names and then all the records of that table, in 1 template part (not wrking with if $table== contactsheet elseif $table == "appointments" and so on)

thanks for any ideas!
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Jul 02, 2003 5:24 pm    Post subject: Reply with quote

A novel (though rather unorthodox) approach is to write a custom resource that dynamically generates the template based on the data returned back from your recordsets.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP