Categories > TinyButStrong general >

Listbox

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Uwe
Date: 2003-04-05
Time: 15:40

Listbox

Hello!
I found your template system in the net and at the moment I try
to test it. TBS is a very nice tool and I thinke I'll use it.

One question. How can I fill a listbox from a mysql DB?



By: Skrol29
Date: 2003-04-05
Time: 16:23

Re: Listbox

Hello Uwe,

I'm glad you enjoy TBS :)

You can fill a listbox simply by merging a block.
The block can be define within the first item of the list in the template
wich is quite pratical with Dreamweaver.

For example this is the code for list of categories in this Forum application :
Html :
<option value="[cat.cat_id]">[cat.cat_title;block=opt]</option>
Php :
$TBS->MergeBlock('cat',$cnx_id,'SELECT cat_id,cat_title FROM t_forum_category ORDER BY cat_order') ;

Maybe I should add an exemple for that point in the examples set.