I everyone,
How can I handle custom table in Elgg (create custom table). Is there any documentaion about this ?
Regards,
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- Hermand Pessek@rheman
Hermand Pessek - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- seri_ng@seri_ng
seri_ng - 0 likes
- Jerome Bakker@jeabakker
Jerome Bakker - 0 likes
- seri_ng@seri_ng
seri_ng - 0 likes
You must log in to post replies.What do you mean by 'custom table'?
By custom table, l mean create a new database table.
In most cases, there's no need to create new tables in the database.
According to Elgg documentation, Elgg supports custom SQL queries using the database API.
Also, you can learn DBAL documentation.
@Hermand Pessek. If you strongly wanted to create your own table in addition to Elgg tables, you can do it by following below code block in the init( ) of the Bootstrap class.
@seri_ng
It would be even better to do this in the activate() function of the Bootstrap. That way it only gets called when you activate the plugin and not on every request.
PS: in 12 years of developing for Elgg I never needed to create my own table, just saying ;)
@Jerome Bakker
That is indeed much better to put the script in the activate( ) :)