I am following a tutorial document which shows me how to build a "restuarant review" component. This is useful as the site I am currently working on requires this.
However while following the tutorial I have an error come up on one of my pages "Table Review not supported. File not found."
I can post detailed code if it is required but this is what I can see is going on from my perspective.
Code: Select all
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
require_once( JApplicationHelper::getPath( 'admin_html') );
JTable::addIncludePath(JPATH_COMPONENT.DS.'tables');
// Some code for a switch statement.
}
function editReview( $option ) {
$row =& JTable::getInstance('Review', 'Table');
This is the code I am using to first reference my database and I feel it is here the error is. Given that my table is called jos_review_data what should this line read.
I have also created a sub directory and file tables/reviews.php which contains the following.
Code: Select all
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
class TableReview extends JTable {
var $id = null;
var $submitted_by = null;
var $hotel_being_reviewed = null;
var $text = null;
var $average_rating = null;
function __construct(&$db) {
parent::__construct( '#__reviews_data', 'id', $db );
}
}
?>
Looking at this it looks all ok to me. But it could be useful should the problem be here.