Re: Can anyone help me with editing post_tags ???

2013-06-19 Thread Lilit
i forgot the view

Edit Topic

Form->create('Topic', array('type' => 'file'));

echo $this->Form->input('id', array(
'type'=>'hidden',
'value' => $topic['Topic']['id']
));

echo $this->Form->input('title', array(
'type' => 'text',
'error' => array('class' => 'error-message'),
'label' => 'Title',
'value' => $topic['Topic']['title']
));

echo $this->Form->input('description', array(
'type' => 'textarea',
'error' => array('class' => 'error-message'),
'label' => 'Description',
'value' => $topic['Topic']['description']
));

$topicTag='';
foreach($editTags as $editTag){
$topicTag.=$editTag['Tag']['title'].' ';
}
echo $this->Form->input('tags', array(
'type'=>'text',
'error' => array('class' => 'error-message'),
'label' => 'Tags',
'value' => $topicTag
));

so can you help? :(



--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/Can-anyone-help-me-with-editing-post-tags-tp5715315p5715332.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: E_STRICT error popping up in production.

2013-06-19 Thread Dakota
Why not just fix the cause of the E_STRICT notice?

On Thursday, 20 June 2013 03:42:11 UTC+2, Chris Cinelli wrote:
>
> Just to make it clear.  It pops up in the browser. 
>
> On Wed, Jun 19, 2013 at 6:41 PM, Chris Cinelli <
> chris@formativelearning.com > wrote:
>
>> We are on cakePHP 2.2.1
>>
>> I have an E_STRICT error popping in up in production even if CORE_DEBUG = 
>> 0
>>
>> Our error handler in core.php is:
>>
>> Configure::write('Error', array(
>>  'handler' => 'ErrorHandler::handleError',
>> 'level' => E_ALL & ~E_DEPRECATED,
>>  'trace' => true
>> ));
>>
>> Do I need to have 'level' => E_ALL & ~E_DEPRECATED & ~E_STRICT ?
>> Why is it not like this by default?
>>
>> Best,
>>Chris
>>
>> --Everything should be made as simple as possible, but not simpler 
>> (Albert Einstein)
>> Read it as: "As simple as possible, as complex as necessary"
>>  
>
>
>
> -- 
> Best,
>Chris
>
> --Everything should be made as simple as possible, but not simpler (Albert 
> Einstein)
> Read it as: "As simple as possible, as complex as necessary"
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: E_STRICT error popping up in production.

2013-06-19 Thread Chris Cinelli
Just to make it clear.  It pops up in the browser.

On Wed, Jun 19, 2013 at 6:41 PM, Chris Cinelli <
chris.cine...@formativelearning.com> wrote:

> We are on cakePHP 2.2.1
>
> I have an E_STRICT error popping in up in production even if CORE_DEBUG = 0
>
> Our error handler in core.php is:
>
> Configure::write('Error', array(
>  'handler' => 'ErrorHandler::handleError',
> 'level' => E_ALL & ~E_DEPRECATED,
>  'trace' => true
> ));
>
> Do I need to have 'level' => E_ALL & ~E_DEPRECATED & ~E_STRICT ?
> Why is it not like this by default?
>
> Best,
>Chris
>
> --Everything should be made as simple as possible, but not simpler (Albert
> Einstein)
> Read it as: "As simple as possible, as complex as necessary"
>



-- 
Best,
   Chris

--Everything should be made as simple as possible, but not simpler (Albert
Einstein)
Read it as: "As simple as possible, as complex as necessary"

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




E_STRICT error popping up in production.

2013-06-19 Thread Chris Cinelli
We are on cakePHP 2.2.1

I have an E_STRICT error popping in up in production even if CORE_DEBUG = 0

Our error handler in core.php is:

Configure::write('Error', array(
 'handler' => 'ErrorHandler::handleError',
'level' => E_ALL & ~E_DEPRECATED,
 'trace' => true
));

Do I need to have 'level' => E_ALL & ~E_DEPRECATED & ~E_STRICT ?
Why is it not like this by default?

Best,
   Chris

--Everything should be made as simple as possible, but not simpler (Albert
Einstein)
Read it as: "As simple as possible, as complex as necessary"

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to edit a view in Cake php

2013-06-19 Thread Ravinder Kaur
Table Products have a foreign key 'product_family_id'  and have belongs to
relationship with Product_families table.
Table Product_families have foreign key 'customer_id' and have belongs to
relationship with Customers table.
Now How can i connect Product model and Customer model to have customer
name in Product View.




On Wed, Jun 19, 2013 at 10:29 AM, Ravinder Kaur  wrote:

> Yes I have model for all my tables..
>
>
> On Tue, Jun 18, 2013 at 7:25 PM, Eric Haskins  wrote:
>
>> Do you have a Customers Model? I have models for all of my tables
>>
>>
>>
>>
>> On Monday, June 17, 2013 5:38:40 PM UTC-4, Raks wrote:
>>
>>> Returns an Error
>>>
>>> {"code":500,"url":"\/products\**/listing_data.json","name":"**Call to a 
>>> member function find() on a non-object"}
>>>
>>>
>>>
>>> On Mon, Jun 17, 2013 at 1:26 PM, Gaurav Matta wrote:
>>>
 If you only want name of customers then you can add public $uses=
 array('product','customer'); as a datamember in your controller class

 And you can use $this->customer->find('all') in ur action

 Let me know if this helps
 On 17-Jun-2013 11:08 PM, "Raks"  wrote:

>  Have added a new Column... but m not able to get a column data from
> other model. I want name from customers table in products view.ctp.
>
> here's the view code:
> * $records = array();
> foreach ($products as $product){
>
> $status = ($product['Product']['is_active'] == '1') ? 'Enabled' :
> 'Disabled';
>
> $records[] = array(
> 'Product.model' => array('title' =>
> $product['Product']['model'], 'id' => $product['Product']['id']),
> 'Product.part_num' =>
> $product['Product']['part_num'],
> 'ProductFamily.name' =>
> $product['ProductFamily']['name'],
>// shows customer id.. but want customer
> name from customers table according to customer id.
>   //'Customer.name'=>$product['ProductFamily']['customer_id'],
> 'Product.iron_oem' =>
> ($product['Product']['iron_oem']) ?  'Iron Systems':'Third Party',
> 'ProductType.title' =>
> $product['ProductType']['title'],
> 'Product.is_active' => $status,
> );
> }
>
> $data = json_encode($records);
> $ret = "{data:" . $data .",\n";
> $ret .= "pageInfo:{totalRowNum:" . $total . "},\n";
> $ret .= "recordType : 'array'}";
> echo $ret;
> ?>*
> On Friday, June 7, 2013 11:40:19 AM UTC-7, Raks wrote:
>>
>> Hi,
>>
>> I Have a piece of code having view, model and controller . I nee dto
>> make changes to view only not in the database.
>> So how can i do that. Do I need to edit model and controller as well.
>> I am new to Cakephp and MVC framework too.
>>
>> Thanks.
>>
>  --
> Like Us on FaceBook 
> https://www.facebook.com/**CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google
> Groups "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to cake-php+u...@**googlegroups.com.
>
> To post to this group, send email to cake...@googlegroups.com.
>
> Visit this group at 
> http://groups.google.com/**group/cake-php
> .
> For more options, visit 
> https://groups.google.com/**groups/opt_out
> .
>
>
>
  --
 Like Us on FaceBook 
 https://www.facebook.com/**CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to a topic in the
 Google Groups "CakePHP" group.
 To unsubscribe from this topic, visit https://groups.google.com/d/**
 topic/cake-php/2KJFo4Ix7Ew/**unsubscribe
 .
  To unsubscribe from this group and all its topics, send an email to
 cake-php+u...@**googlegroups.com.
 To post to this group, send email to cake...@googlegroups.com.

 Visit this group at 
 http://groups.google.com/**group/cake-php
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_out
 .



>>>
>>>
>>>
>>> --
>>> ---*Ravinder Kaur*
>>>
>>  --
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Find us on Twitter http://twitter.com/CakePHP
>>
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "CakePHP" group.
>> To unsubscribe from this topic, visit
>> https://groups.goog

Re: How to edit a view in Cake php

2013-06-19 Thread Ravinder Kaur
Yes I have model for all my tables..


On Tue, Jun 18, 2013 at 7:25 PM, Eric Haskins  wrote:

> Do you have a Customers Model? I have models for all of my tables
>
>
>
>
> On Monday, June 17, 2013 5:38:40 PM UTC-4, Raks wrote:
>
>> Returns an Error
>>
>> {"code":500,"url":"\/products\**/listing_data.json","name":"**Call to a 
>> member function find() on a non-object"}
>>
>>
>>
>> On Mon, Jun 17, 2013 at 1:26 PM, Gaurav Matta wrote:
>>
>>> If you only want name of customers then you can add public $uses=
>>> array('product','customer'); as a datamember in your controller class
>>>
>>> And you can use $this->customer->find('all') in ur action
>>>
>>> Let me know if this helps
>>> On 17-Jun-2013 11:08 PM, "Raks"  wrote:
>>>
  Have added a new Column... but m not able to get a column data from
 other model. I want name from customers table in products view.ctp.

 here's the view code:
 *>>> $records = array();
 foreach ($products as $product){

 $status = ($product['Product']['is_active'] == '1') ? 'Enabled' :
 'Disabled';

 $records[] = array(
 'Product.model' => array('title' =>
 $product['Product']['model'], 'id' => $product['Product']['id']),
 'Product.part_num' =>
 $product['Product']['part_num'],
 'ProductFamily.name' =>
 $product['ProductFamily']['name'],
// shows customer id.. but want customer
 name from customers table according to customer id.
   //'Customer.name'=>$product['ProductFamily']['customer_id'],
 'Product.iron_oem' =>
 ($product['Product']['iron_oem']) ?  'Iron Systems':'Third Party',
 'ProductType.title' => $product['ProductType']['
 title'],
 'Product.is_active' => $status,
 );
 }

 $data = json_encode($records);
 $ret = "{data:" . $data .",\n";
 $ret .= "pageInfo:{totalRowNum:" . $total . "},\n";
 $ret .= "recordType : 'array'}";
 echo $ret;
 ?>*
 On Friday, June 7, 2013 11:40:19 AM UTC-7, Raks wrote:
>
> Hi,
>
> I Have a piece of code having view, model and controller . I nee dto
> make changes to view only not in the database.
> So how can i do that. Do I need to edit model and controller as well.
> I am new to Cakephp and MVC framework too.
>
> Thanks.
>
  --
 Like Us on FaceBook 
 https://www.facebook.com/**CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google
 Groups "CakePHP" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to cake-php+u...@**googlegroups.com.

 To post to this group, send email to cake...@googlegroups.com.

 Visit this group at 
 http://groups.google.com/**group/cake-php
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_out
 .



>>>  --
>>> Like Us on FaceBook 
>>> https://www.facebook.com/**CakePHP
>>> Find us on Twitter http://twitter.com/CakePHP
>>>
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "CakePHP" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/**
>>> topic/cake-php/2KJFo4Ix7Ew/**unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> cake-php+u...@**googlegroups.com.
>>> To post to this group, send email to cake...@googlegroups.com.
>>>
>>> Visit this group at 
>>> http://groups.google.com/**group/cake-php
>>> .
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out
>>> .
>>>
>>>
>>>
>>
>>
>>
>> --
>> ---*Ravinder Kaur*
>>
>  --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "CakePHP" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/cake-php/2KJFo4Ix7Ew/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
---*Ravinder Kaur*

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You rece

Re: Error: Mysql requires a database connection

2013-06-19 Thread Raxit
Gaurav,

I did it but result is still same.

Raxit

On Wednesday, June 19, 2013 9:53:02 AM UTC+5:30, gaurav wrote:
>
> Faced same error while migration of project from 1.2 to 2.x. Try clearing 
> cache
>
> /App/temp/cache
> You will find some folders...like model,view etc..dont delete those but 
> delete all files in them..
> On 18-Jun-2013 6:54 PM, "Raxit" > wrote:
>
>>  *Hi,
>> *
>>
>> *I am facing this problem from past 5 days. Didn't find any solution. I 
>> have checked connection many times. my team have also checked all the 
>> connections with Mysql. File is also present under same path.
>> *
>>
>> *Error: * Confirm you have created the file : app\Config\database.php.
>>
>> *Notice: * If you want to customize this error message, create 
>> app\View\Errors\missing_connection.ctp.
>> Stack Trace 
>>
>>- ROOT\lib\Cake\Model\ConnectionManager.php line 
>> 101→
>>  
>>
>> DboSource->__construct(array)
>>  
>>- ROOT\lib\Cake\Model\Model.php line 
>> 3417→
>>  
>>
>> ConnectionManager::getDataSource(string)
>>  
>>- ROOT\lib\Cake\Model\Model.php line 
>> 1083→
>>  
>>
>> Model->setDataSource(string)
>>  
>>- ROOT\lib\Cake\Model\Model.php line 
>> 3443→
>>  
>>
>> Model->setSource(string)
>>  
>>- ROOT\lib\Cake\Model\Model.php line 
>> 2698→
>>  
>>
>> Model->getDataSource()
>>  
>>- APP\Model\Setting.php line 
>> 16→
>>  
>>
>> Model->find(string)
>>  
>>- APP\Controller\FunfordayController.php line 
>> 268→
>>  
>>
>> Setting->updateCache()
>>  
>>- APP\Controller\FunfordayController.php line 
>> 47→
>>  
>>
>> FunfordayController->_loadSettings()
>>  
>>- [internal 
>> function]→
>>  
>>
>> FunfordayController->beforeFilter(CakeEvent)
>>  
>>- ROOT\lib\Cake\Event\CakeEventManager.php line 
>> 246→
>>  call_user_func(array, 
>>
>> CakeEvent)
>>  
>>- ROOT\lib\Cake\Controller\Controller.php line 
>> 670→
>>  
>>
>> CakeEventManager->dispatch(CakeEvent)
>>  
>>- ROOT\lib\Cake\Routing\Dispatcher.php line 
>> 100→
>>  
>>
>> Controller->startupProcess()
>>  
>>- ROOT\lib\Cake\Routing\Dispatcher.php line 
>> 85→
>>  Dispatcher->_invoke(FunfordayController, 
>>CakeRequest, 
>> CakeResponse)
>>  
>>- APP\webroot\index.php line 
>> 94→
>>  Dispatcher->dispatch(CakeRequest, 
>>
>> CakeResponse)
>>  
>>
>>  -- 
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Find us on Twitter http://twitter.com/CakePHP
>>  
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "CakePHP" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to cake-php+u...@googlegroups.com .
>> To post to this group, send email to cake...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/cake-php.
>> For more options, visit https://grou

Re: Error: Mysql requires a database connection

2013-06-19 Thread Raxit
Eric,

Yes i have created one file to test Mysql connection and it is working 
fine. But when i write my domain name, it directly gives me error of 
missing database connection. I did some research and i found that it is 
using some different path. 

This site is running under apache server. but i want to make it running 
under IIS7.

*
In Apache server output *

*[base] => /funforday
[webroot] => /funforday/

**In IIS server output 

[base] => /funforday/app/webroot/index.php
[webroot] => /funforday/app/webroot/*


So How can i change this path ? I try to change web.config file but result 
is same.

Raxit

On Wednesday, June 19, 2013 8:00:53 AM UTC+5:30, Eric Haskins wrote:
>
> Raxit,
>
>Did you edit the settings to match your User and password for your 
> Mysql instance? Mysql is running?
>
> Eric
>
> On Tuesday, June 18, 2013 12:28:00 PM UTC-4, Raxit wrote:
>>
>> Hi raj kumar,
>>
>> I have added database.php file with same content under config folder 
>> still it gives same error. I am using cake php so it might be reason for 
>> this problem. I have check the mysql connection file under webroot, it is 
>> working perfectly fine but problem occurs when i call index.php.
>>
>> Thanks
>> Raxit
>>
>> On Tuesday, June 18, 2013 8:53:12 PM UTC+5:30, raj kumar Pustela wrote:
>>>
>>> Hi..
>>>  do u have database.php file in your config folder.
>>>  
>>>  If don't create database.php file in your config folder
>>>
>>>   Follow below process .. it's as a simple.
>>>
>>> create the database.php file and past the below code.
>>>
>>> >> class DATABASE_CONFIG {
>>>
>>> public $default = array(
>>> 'datasource' => 'Database/Mysql',
>>> 'persistent' => false,
>>>  'host' => 'localhost',
>>> 'login' => 'root',
>>> 'password' => '',
>>>  'database' => 'test',
>>> 'prefix'=>'zp_',
>>> );
>>> }
>>>
>>>
>>> On Tue, Jun 18, 2013 at 4:56 PM, Raxit  wrote:
>>>
 *Hi,
 *

 *I am facing this problem from past 5 days. Didn't find any solution. 
 I have checked connection many times. my team have also checked all the 
 connections with Mysql. File is also present under same path.
 *

 *Error: * Confirm you have created the file : app\Config\database.php.

 *Notice: * If you want to customize this error message, create 
 app\View\Errors\missing_connection.ctp.
 Stack Trace 

- ROOT\lib\Cake\Model\ConnectionManager.php line 
 101→
  

 DboSource->__construct(array)
  
- ROOT\lib\Cake\Model\Model.php line 
 3417→
  

 ConnectionManager::getDataSource(string)
  
- ROOT\lib\Cake\Model\Model.php line 
 1083→
  

 Model->setDataSource(string)
  
- ROOT\lib\Cake\Model\Model.php line 
 3443→
  

 Model->setSource(string)
  
- ROOT\lib\Cake\Model\Model.php line 
 2698→
  

 Model->getDataSource()
  
- APP\Model\Setting.php line 
 16→
  

 Model->find(string)
  
- APP\Controller\FunfordayController.php line 
 268→
  

 Setting->updateCache()
  
- APP\Controller\FunfordayController.php line 
 47→
  

 FunfordayController->_loadSettings()
  
- [internal 
 function]→
  

 FunfordayController->beforeFilter(CakeEvent)
  
- ROOT\lib\Cake\Event\CakeEventManager.php line 
 246→
  call_user_func(array, 

 CakeEvent)

Cakephp netbeans plugin no command available on mac

2013-06-19 Thread Levavasseur Jacques
When i try to run command with thé netbeans cakephp plugin i've got no 
command available.

To resolve this i add this in lib/Cake/Cache/CacheEngine.php at line 60

if(strpos(PHP_OS,'WIN')===false) : date_default_timezone_set('GMT');  endif;

For me it's work with GMT but you can specify your timezone.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




CakePHP on Windows Azure

2013-06-19 Thread James Watts
We recently teamed up with Microsoft to bring CakePHP to the Windows Azure 
cloud platform. You can view it now on the Windows Web App Gallery, check 
it out here - http://www.microsoft.com/web/gallery/cakephp.aspx

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Model and Datasource for NoSQL (MongoDB) - relations

2013-06-19 Thread Mickaël Lagarde
Hi,
Great job ! 
Associations work well but I have problems when I use the behavior 
Containable, it does not work as it should (with class  
extends MongodbAppModel)

$results = $this->Fondeurversion->find('all', array(
'order' => array('name' => 1),
'contain' => array(
'Fondeurgamme' => array(
'Fondeur' => array(
'fields' => array('id', 'name')
),
)
)
));

What is the release date of version 2.0b?
Thank you again and I hope you will continue

Sorry to post it here, I can not create a new issue on your fork

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Multiple model types specialization/generalization

2013-06-19 Thread Allan Diego


Hello,

How can I implement multiple types of models?
example:
User (common attributes) (used in the ACL for authentication)
 User_type_A (specific profile atributes)
 User_type_B (specific profile atributes)

User_type_A should be treated as (User data + specific data)
I tried to use User hasOne User_type_A
   User hasOne User_type_B

there are problems:
to add a new User_type_A  I can not use its own Controller to save User(parent 
commom data) 

specializations also relate to others specific model types, and this way 
cant retrive the parent model data. to do this work i would have to relate 
to the parent model because then I would have data from 2 models (because 
hasOne)

how can implemnetar this? for cake use (User+User_type_A) as one entity 
user_A  

or (Project+Project_type_A) as Project_A 




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Cake is NOT able to connect to the database. Database connection "Mysql" is missing, or could not be created.

2013-06-19 Thread deveshchauhan27
Hello,
Gabriel
I have same problem. Can you tell me how you fixed it.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Can anyone help me with editing post_tags ???

2013-06-19 Thread Lilit
this is a part of code for adding topic with tags

$save = $this->Topic->save($data['Topic']);
if($save){
$tags = explode(',', $data['Topic']['tags']);
foreach($tags as $tag){
$tag = strtolower(trim($tag));
if($tag){
$foundTag = $this->Tag->find(
'first', array(
'conditions' => array(
'Tag.title' => $tag
)
)
);
if($foundTag){
$topicTags['TopicTag']['tagId'] =
$foundTag['Tag']['id'];
}else{
$this->Tag->create();
$savedtag = $this->Tag->save(array('Tag'
=> array('title' => $tag)));
$topicTags['TopicTag']['tagId'] =
$savedtag['Tag']['id'];
}
$topicTags['TopicTag']['topicId'] =
$save['Topic']['id'];
$this->TopicTag->create();
$this->TopicTag->save($topicTags);
}
}

i have problems with editing,, have to find all tag id before editing and
after editing, something like that,
there's three tables
topics, tags and topic_tags with topicId and tagId,
sorry for bad explanation
thanks



--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/Can-anyone-help-me-with-editing-post-tags-tp5715315p5715319.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Can anyone help me with editing post_tags ???

2013-06-19 Thread Eric Haskins
What are you trying to do??  Example code?
 

Eric 

On Wednesday, June 19, 2013 4:55:49 AM UTC-4, Lilit Bakunts wrote:
>
>
>
>
>
> -- 
> View this message in context: 
> http://cakephp.1045679.n5.nabble.com/Can-anyone-help-me-with-editing-post-tags-tp5715315.html
>  
> Sent from the CakePHP mailing list archive at Nabble.com. 
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: backup of mysql using cakephp

2013-06-19 Thread Renato de Freitas Freire
Why don't you use mysqldump?
It's the best way.

--
Renato Freire




On Wed, Jun 19, 2013 at 2:34 AM, Nikunj Amipara wrote:

> hi,
> does any one know how do i backup my sql database in simple sql file using
> cakephp
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Can anyone help me with editing post_tags ???

2013-06-19 Thread Lilit




--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/Can-anyone-help-me-with-editing-post-tags-tp5715315.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.