Latest blog list on a page outside of Concrete5 using PHP

Permalink
Hi

I have concrete5 installed in a subdirectoryhttp://www.mydomain.com/blog with pro-blog addon

I have been trying to add a list of the latest 4 blog articles onhttp://www.mydomain.com, which is outside of my Concrete5 installation, using PHP and MySQL queries. I am really struggling to understand the relationships between all the tables involved to output this simple list.

blog url, blog title, blog author
blog url, blog title, blog author
blog url, blog title, blog author
blog url, blog title, blog author

My current code looks like this, and yes I know I am probably querying the wrong table, but this is why I am here asking this question! The code below is to show I understand how to connect and output a list. This code generates the title, but i need to know how to connect the dots to get the author, title and url of only the latest 4 blog articles and not any other pages like search etc. I have searched everywhere for help on this but cannot find anything to point me in the right direction. I have searched through the database tables, and whilst there is mention of all the bits I need they appear in many tables and is causing me serious confusion.

$dbblog=mysql_connect('localhost', 'root', 'root', true);
mysql_select_db('rcsblog',$dbblog);
$queryblog = "
   SELECT * 
   FROM PageSearchIndex
   ORDER BY cDatePublic desc
   LIMIT 4     
   ";
$resultblog = mysql_query($queryblog,$dbblog) or die (MSG_ERR_DB_QUERY_FAILED);
$rezultatblog = mysql_num_rows($resultblog);
   for ( $i=0; $i < $rezultatblog; $i++ )
      {
      $rowBlog = mysql_fetch_array($resultblog);
      echo $rowBlog['cName'];
      }


Please help me make sense of the relationship and the correct queries to get the above list to work.

Many thanks
Mark

 
RadiantWeb replied on at Permalink Reply
RadiantWeb
This should probably go in PB support. But I would approach this differently all together. I would try RSS?

ChadStrat
dube007 replied on at Permalink Reply
Thanks ChadStrat for your reply, I will look into RSS and see if that helps. I am very surprised I cannot find any information out there on how to achieve a simple blog roll from outside of the concrete5 installation. Even a hint at the solution is hard to find.

Anyone else with any ideas?