On 3 Apr 2011, at 17:51, pgredeye wrote:
> 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
Jeremy Burns
Class Outfit
jeremyburns@classoutfit.com
http://www.classoutfit.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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment