Categories > TinyButStrong general >

Joomla Articles

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Anthony
Date: 2008-12-09
Time: 15:39

Joomla Articles

I need to have a select statement from a database displayed in an article.  for example..

In joomla I create an article.  In that article i would like to display the results of a SQL statement.  I am not using data from the joomla database.

Please help, I have installed the joomla plugin already but i am unsure of the code to do the following.

I need to have a connection string to a mySQL database not the joomla one.

Embed a SQL statement that will place the results in the article

Thanks
Anthony
By: Skrol29
Date: 2008-12-09
Time: 21:31

Re: Joomla Articles

Hi Anthony,

This is quote simple, you just have get inspired from the manual example.
<?php

$con_id = mysql_connect(...);
$TBS->MergeBlock('u',$con_id,'SELECT * FROM table1');

?>


Then call the script by putting the following tag in the Joomla Article:
{tbs}script=scriptname.php{/tbs}