Hai guys,
     I have got a problem while working with cakephp.This is the error

Fatal Error (256): ConnectionManager::getDataSource - Non-existent data
source $blog [CORE/cake/libs/model/connection_manager.p
  
context:
         $name  =       "$blog"
$_this  =       ConnectionManager
ConnectionManager::$config = DATABASE_CONFIG object
ConnectionManager::$_dataSources = array
ConnectionManager::$_connectionsEnum = array

and this is my app/config/database .php file
var $blog = array(
        'driver' => 'mysql',
        'persistent' => false,
        'host' => 'localhost',
        'login' => 'root',
        'password' => 'scourlet',
        'database' => 'blog',
        'prefix' => '',
    );

  and this is my blog app's model code

 <?php
 class Post extends AppModel {
    var $useDbConfig = '$blog'; //
    var $name = 'Post';
    var $validate = array('title' => array(
    'alphanumeric' => array(
    'rule' => 'alphanumeric',
    'required' => true,
    'message' => 'enter a title to post',
    )
  ),
  'content' => array(
  'alphanumeric' => array(
  'rule' => 'alphanumeric',
  'required' => true,
  'message' => 'enter some content to post',
  )
         )
  );
 }
 ?>
Thank you,
pgredeye



--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/Non-existent-data-source-tp4279029p4279029.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to