// In project settings, set master-detail relationship $config['master_detail'] = array( 'posts' => array( 'master_table' => 'categories', 'master_key' => 'id', 'detail_key' => 'category_id' ) ); // Override the default query in list page public function OnBeforeListQuery(&$sql, &$params)
* Add custom HTML here * <div class="alert alert-info"> Custom message for all posts </div>
// config.php ini_set('display_errors', 1); error_reporting(E_ALL); Solution: Check permissions and paths phprad classic
Create a cron script:
// pages/posts_add.php public function OnBeforeSave() // In project settings
$sql = "SELECT * FROM posts WHERE views > :min_views"; return $this->ExecuteSQL($sql, array('min_views' => 100));
chmod 777 templates_c/ # Clear compiled templates rm -rf templates_c/* Solution: Verify credentials and PDO driver array( 'master_table' =>
// Test connection script try $pdo = new PDO("mysql:host=localhost;dbname=test", "user", "pass"); echo "Connected successfully"; catch(PDOException $e) echo "Error: " . $e->getMessage();
return true; Modify class files: