MyBB Community Forums

Full Version: SQL print in template
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello.

I have for example this structure:

[Image: IRHIWTl.png]


I would like output this in usercp template, but I don't know how to get value in template. In PHP my query is all right - when I checked output (echo) of query I saw records. But I don't know how to read records in template editor to show this on user control panel.

Sorry for my bad English and greetings for MyBB Community.
It depends on which hook you are using and which template you want the values to show in. The basic idea and best approach mostly is to pick the proper hook and parse the template at the end of your function right after getting the data from the DB.