example of displaying another table's content in the same DB
Posted: Wed Nov 11, 2009 12:04 am
I am still learning about user defined tags, but I still don't know how to do things.
I have a table, in the same DB as my CMSMS install, called users, with fields , ID / firstname / surname / country
eg.
ID / firstname / surname / country
1 / paul / connors / ireland
2 / mary / martin/ england
3 / jack / hurley / ireland
4 / sean / jones / ireland
And now I want to display the table data on say a page called "ireland" but I only want to list the users who have ireland as their country code.
Some questions:
1) as it's a new table do I have to do another DB connect ?
2) Can I pass a content block details to the UDT ? as in one content block is titled country, and if I put in ireland on that content page it will only show people with ireland property
3) can I parse GET variables, as in if I wanted to do pagnation of pages that will have too many entries ? as in specify a start paramater ?
Any ideas ?
I have a table, in the same DB as my CMSMS install, called users, with fields , ID / firstname / surname / country
eg.
ID / firstname / surname / country
1 / paul / connors / ireland
2 / mary / martin/ england
3 / jack / hurley / ireland
4 / sean / jones / ireland
And now I want to display the table data on say a page called "ireland" but I only want to list the users who have ireland as their country code.
Some questions:
1) as it's a new table do I have to do another DB connect ?
2) Can I pass a content block details to the UDT ? as in one content block is titled country, and if I put in ireland on that content page it will only show people with ireland property
3) can I parse GET variables, as in if I wanted to do pagnation of pages that will have too many entries ? as in specify a start paramater ?
Any ideas ?