PHPRtfLite is not made for connecting databases. What I would suggest you is to create a class that takes a query result set and uses the PHPRtfLite library to print out the query result. So you clearly separated concerns. Your class wouldn't even know, that it was a mysql query that produced that result set.
Greets,
Sigma
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, it's possible to stablish a mysql connection in PHPRtfLite and print the query results in the generated rtf file?
Thanks for this great class.
Hello,
PHPRtfLite is not made for connecting databases. What I would suggest you is to create a class that takes a query result set and uses the PHPRtfLite library to print out the query result. So you clearly separated concerns. Your class wouldn't even know, that it was a mysql query that produced that result set.
Greets,
Sigma