Sunday, April 3, 2011

Non-existent data source

Hai Guys,
I have a problem arised while creating an blog app ,its showing
that there is no data source .so, please
can you help me
this is my database.php piece of code to specify the blog data
base.
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.

--
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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate