Hi all,
what would be the best method to access a table from the database. Somebody mentioned it's all (db name, user etc.) already in an array?
Backround: I creted a new table containing additonal info about bike tours which I read out with a php script which I include in a specific template. I try to use global variables and methods instead of defining it again just for this script.
Second problem (that's the disadvantage not using the defined structure) the data in this table is not included in the site search. Is there any easy way to workaround this?
Thanks for any hints, Beppo
database access
Hi bepposum,
- if you have a lot of listings you might want to take a look
- at EXDATA_MOD and then use a {REP_TAG} to access
- does not supports inclusion in phpWcms 1.3.0+ site search results atm.
- from breitsch (the developer): >= 1.3.0 the search-function-file changed and I did not adapt it.
- I think Oliver is working on a definable database add-on feature at some stage - which will likely be searchable - this is a much needed feature.
Having said all this - why not include this data in a content part in a given article. I know this sounds less than what you want. But if you had an separate external db interface - why not paste the contents into a given article - manual yes - but definitely will come up in search results.
If you needed to use that data in multiple locations - might want to think about defining data in separate article (inside hidden category), place your data inside contentpart (ie 84) then use {SHOW_CONTENT:CP,84} inside public articles, then use a redirection from the separate article (hidden) - to a designated master article. This will produce search results inside phpWcms.
cheers
- if you have a lot of listings you might want to take a look
- at EXDATA_MOD and then use a {REP_TAG} to access
- does not supports inclusion in phpWcms 1.3.0+ site search results atm.
- from breitsch (the developer): >= 1.3.0 the search-function-file changed and I did not adapt it.
- I think Oliver is working on a definable database add-on feature at some stage - which will likely be searchable - this is a much needed feature.
Having said all this - why not include this data in a content part in a given article. I know this sounds less than what you want. But if you had an separate external db interface - why not paste the contents into a given article - manual yes - but definitely will come up in search results.
If you needed to use that data in multiple locations - might want to think about defining data in separate article (inside hidden category), place your data inside contentpart (ie 84) then use {SHOW_CONTENT:CP,84} inside public articles, then use a redirection from the separate article (hidden) - to a designated master article. This will produce search results inside phpWcms.
cheers