Re: Many to Many relationship issue

2009-07-14 Thread womble
I'm only a cake noob, and I obviously don't know for sure about how your thinking of Users and Profiles. In my mind: User hasOne Profile Follower hasAndBelongsToMany Profiles (or prehaps instead of Profiles its Users) But User and Follower are essentially the same so in my Database mind.

Re: Message system table setup

2009-07-14 Thread John Andersen
Hi Dave, What are the requirements for the messages regarding: 1) deletion by either the sender or the receiver? For example: the sender deletes the message, but the message must still be viewable by the receiver! 2) multiple receivers? For example: to a group, do each group member get the messag

Re: Unknown column in where clause - help (not as simple as it sounds)

2009-07-14 Thread womble
Possibly gives me some ideas, thanks for your post. What I am actually doing is working on an ACL management plugin. I'm making an Ajax call where I have the aco_id, and need to get back the assigned Aro's (including the associated Group or User name ) and its permissions. Think of a explorer tr

Re: Many to Many relationship issue

2009-07-14 Thread joshua
In my opinion, the better way is defining these two tables with their business name separately. e.g. profiles_followings profiles_followersAnd there is another way to fix this is add a 'type' column to distinct follower and following in one table. On Wed, Jul 15, 2009 at 7:35 AM, abhishekh wrote

Many to Many relationship issue

2009-07-14 Thread abhishekh
Hi, I have a quick question about Many to Many relationship works in cakephp. I have two priamry tables. 1)users 2)profiles. There is Many to Many relationship between these tables i.e profiles_users table. Till here its fine. Now, here is a new thing... I have one more Many to Many relationship

Re: HABTM saving problem - solved (I think)

2009-07-14 Thread cc_humbry
Finally sorted this for anyone else who has the same problem... iterate over my array and save each item individually. Get each id of inserted row and add to new data array and then save Category. This then creates the associations in the link table. foreac

View caching - multiple domains (L10n)

2009-07-14 Thread 3lancer.eu
Hello, I'm building an app where language versions will be set using subdomains (en.app.tld, de.app.tld etc). Therefore I'd like to hear from any of you who have experience with Cake view caching in such a case. As far as I see the filenames in app/tmp/cache/views are built using url only, so sho

Java Applet on the mac java.util prohibited

2009-07-14 Thread Benjy1979
I have a problem on the mac (not windows) whereby the javaFX applet crashes with a security exception, prohibited package java.util. I have been trying to fix this for 2 weeks now but I'm new at cakephp and am unable to. This only happens on the mac. There's no doubt that it is the fault of cakep

Re: Multiples lists of different tables :S

2009-07-14 Thread 3lancer.eu
Hello, > Actually I have 4 tables in my database : > > 1-comments > 2-posts > 3-categories > 4-work > > And i have a lonely page : default.php (my web site is juste 1 page ). > which is located in my webSite Root. Any reason not to follow the Cake MVC pattern / file structure? > So i want to ge

Re: hi,is it one bug is model?

2009-07-14 Thread 3lancer.eu
Hi, > Under the first note--My english is bad,so say sorry first to every > member. > > ok, I find an eminently case in model method about save data into > database. > > exapmple1 > $this->data=array( >        'Modelname'=>array( >                 'id' => '123', >                 'somefield'=>0 >

Re: submitting to cookbook

2009-07-14 Thread AD7six
On Jul 14, 1:25 pm, "Krishnan. N" wrote: > Hi, > > Sorry if this has been hashed before; searched very briefly > > The "How it works section" in the manual say: > > 3. Submit additions/edits for review using valid, semantic HTML. > > How best to submit? Hi Krishnan, I invite you to press "edi

Re: Live Validation with jQuery

2009-07-14 Thread Matt Curry
I recently added support for this to my jQuery validation plugin: http://github.com/mcurry/js_validate/tree/master Unfortunately, I haven't written any instructions on how to use it :( Bascially in step #5 you change $validation->bind('Model'); to $validation->bind('Model', array('watch' => array

Re: Run the tutorial Blog issue

2009-07-14 Thread Kau-Boy
You can find XAMPP here: http://www.apachefriends.org/en/xampp-windows.html Just download, install/unzip, copy your files, start xampp and GO! On 14 Jul., 20:58, Kau-Boy wrote: > I also use a windows system to develop but I would suggest to use > XAMPP as a development system as it comes ready t

Message system table setup

2009-07-14 Thread Dave Maharaj :: WidePixels.com
I was curious how to approach this idea. A user can send a message to another user but how would you define the table? id user_id => person receiving from_id =>person sending title message created user hasMany messages but how would you determine that both users get the message? Would you n

Re: Run the tutorial Blog issue

2009-07-14 Thread Kau-Boy
I also use a windows system to develop but I would suggest to use XAMPP as a development system as it comes ready to go. You usualy should have a URL like this: http://localhost/projectname/contorller/action On an apache the files are located in the htdocs folder. This folder directs to http://lo

Error checking aco

2009-07-14 Thread Verdy
Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references: Aro: Array ( [User] => Array ( [id] => 1 [username] => admin1 .. ) ) Aco: Pages [CORE\cake\libs\controller\

RE: Live Validation with jQuery

2009-07-14 Thread Dave Maharaj :: WidePixels.com
Thanks Stu, I did read thru that one but still lost on how to query the db for example for username to check if its used already. I got this one to work as close as possible http://teknoid.wordpress.com/2009/01/21/jquery-in-the-cakephp-world-part-2-i s-client-side-code-all-that-great/ But I no

Re: Live Validation with jQuery

2009-07-14 Thread Stu
http://stackoverflow.com/questions/209127/jquery-live-validation-plug-ins I'm not sure if there's anything ultimately 'caky' to do here. But have a look at it, I'm sure it could be fairly easy to implement. --~--~-~--~~~---~--~~ You received this message because y

Run the tutorial Blog issue

2009-07-14 Thread bigtoch
I followed the instructions given on the CakePhp site. But when I run http://localhost/posts apache tells NOT Found. I have installed Apache and Php and MySQl on windows platform. I just want to know if there any configuration to run to enable me to bake my cakephp app. Thanks --~--~-~--~

Multiples lists of different tables :S

2009-07-14 Thread Abraham Boray
Actually I have 4 tables in my database : 1-comments 2-posts 3-categories 4-work And i have a lonely page : default.php (my web site is juste 1 page ). which is located in my webSite Root. So i want to get all the tables records in my page(default.php) ,all my models r working ,my controllers a

Re: hi,is it one bug is model?

2009-07-14 Thread brian
example2 $this->id=123; $this->Modelname->save(array('somefield'=>0)); $this->ModelName->id = 123; But I think you should also have $this->ModelName->create(); $this->ModelName->id = 123; $this->Modelname->save(array('somefield'=>0)); try that --~--~-~--~~~---~--~-

Re: ACL Management Plugin not saving

2009-07-14 Thread Celso
Please see "network" messages in firebug. Internet explorer does not function... On 12 jul, 03:09, Turgs wrote: > Hello > > I'm trying to use theACLManagementPlugin. > > Does anyone have any suggestions with this small issue: > > I can access the 'Manage AROs' page. When I go to 'Create' a new A

Re: Filtering pagination

2009-07-14 Thread thatsgreat2345
Just set it in the session On Jul 14, 3:06 am, Arnau wrote: > Hi! > > I need paginated lists, and I see Cake really helps with it. > I use a searcher that filters the list and when I change the page the > filter dissapears. > I see I need to send the conditions of the filter from one page to > a

Re: Unknown column in where clause - help (not as simple as it sounds)

2009-07-14 Thread brian
In an app I'm working on now, I get a Group's permissions (for access to a Section) like this: /* fetch the permissions for this group */ $perms = $this->Acl->Aco->find( 'all', array( 'fields' => array('Aco.foreign_key'), 'conditions' => array(

Re: After moving from windows to Ubuntu, getting Missing View error

2009-07-14 Thread GravyFace
Also check your permissions; www-data needs at least read permissions on your files/directories, but check the Linux installation guide for CakePHP (you'll need to grant rw to the tmp directory, etc.). On Tue, Jul 14, 2009 at 11:08 AM, MrMeikel wrote: > > Not very experienced with Linux. But my f

Re: When/how do you publish Bakery articles?

2009-07-14 Thread Jamie
I'm waiting on a tutorial to be published too - 11 days and counting. Some feedback from the higher-ups at the bakery would be nice! On Jul 14, 7:02 am, GravyFace wrote: > I wrote a tutorial on CakePHP + EclipsePDT autocomplete almost a month > ago and it hasn't been published yet.  If there's a

Live Validation with jQuery

2009-07-14 Thread Dave Maharaj :: WidePixels.com
Does anyone know of a good client side live validation tutorial or site where there are examples of using cake / jQuery for live validation?Or a good lace to start? I found a few but they are all submit based or do not do what i need. I need to check unique and my own custom validation rules. t

Re: Error: Database.phpController could not be found

2009-07-14 Thread Jon Bennett
hi, > Hi, I'm getting Error: Database.phpController could not be found.  I'm > just trying to follow the tutorial of the Blog which is part of the > official documentation. You've gone a bit off track if you're following the blog tutorial - you don't want to open that file in the browser, but ed

Error: Database.phpController could not be found

2009-07-14 Thread kako13
Hi, I'm getting Error: Database.phpController could not be found. I'm just trying to follow the tutorial of the Blog which is part of the official documentation. Screenshoot: http://kelvinmedina.com/Untitled-1.png --~--~-~--~~~---~--~~ You received this message b

Re: After moving from windows to Ubuntu, getting Missing View error

2009-07-14 Thread MrMeikel
Not very experienced with Linux. But my first guess would be that Linux uses case-sensitive file names - check all your views to make sure they are correctly cased (I do not know what the correct casing is in this situtation). On Jul 14, 8:24 am, Prabu wrote: > Hi, > > I just moved my cake app f

Re: Another password question

2009-07-14 Thread Carlos Gonzalez Lavin
You can do two things: The first one and the one CMANJS is recommending is to empty both password fields in case validation fields (you can either unset the values in the controller or make sure the input's 'value' attrib is set to "" in the view). This is the one I'd recommend as well. For contro

Re: var $useDbConfig not working - caching?

2009-07-14 Thread Alastair
Hi Komaruloh, I wonder if your mail client is having problems because you posted this twice earlier. As I said in my reply, this isn't the issue but it's been resolved now so many thanks for your suggestion. Alastair On Jul 14, 4:25 am, komaruloh wrote: > I'm not sure if it's all about cache.

hi,is it one bug is model?

2009-07-14 Thread marscode
Under the first note--My english is bad,so say sorry first to every member. ok, I find an eminently case in model method about save data into database. exapmple1 $this->data=array( 'Modelname'=>array( 'id' => '123', 'somefield'=>0 ) ); $this->Modeln

Saving HABTM problems

2009-07-14 Thread cc_humbry
Hi, Can't figure this one out, not for the want of trying though. Models involved are Category, CandidateItem which are associated in each model as HABTM. I created a temp baked project to see if the association definition was correct and it appears to be. In my categories_controller I have a me

Filtering pagination

2009-07-14 Thread Arnau
Hi! I need paginated lists, and I see Cake really helps with it. I use a searcher that filters the list and when I change the page the filter dissapears. I see I need to send the conditions of the filter from one page to another but I think is not a very good idea to pass all the information usin

Re: setFlash and redirect problem

2009-07-14 Thread Kau-Boy
In Line 49 your have this code: $this->Sesssion->setFlash('Bill was sent by e-mail successfully'); The problem is that you have written Session with wrong. It only 2 S in the middle. I know sometimes the easiest error can't be found :-) On Jul 14, 1:40 pm, Raph wrote: > There's still blank page

Re: setFlash and redirect problem

2009-07-14 Thread Kau-Boy
See my correction on your code: http://pastebin.com/m6b2da595 (Use the Diff to see the correction) Sometimes it can be this easy to solve but also very hard to find even looking thousands of times on the same line of code :-) On Jul 14, 1:40 pm, Raph wrote: > There's still blank page. > > On 14

After moving from windows to Ubuntu, getting Missing View error

2009-07-14 Thread Prabu
Hi, I just moved my cake app folder from windows to ubuntu and getting this error : missing view (could not find .ctp) In my controller I have two methods like this: function foo1($viewtype = null) { // loads data here... $this->render($viewtype, 'ajax'); } function fo

I can't reply to discussions!

2009-07-14 Thread Kau-Boy
I tried to help Raph with his setSession problem (http:// groups.google.com/group/cake-php/browse_thread/thread/dd656786dba9de64/ a8cc9fed86fb7b02?hl=en#a8cc9fed86fb7b02) but was not able to reply. I tried five times using diffrent browsers but I didn't succeed. I was able to change his post in th

get Notice (8) "Array to string conversion" "CORE\cake\dispatcher.php" at first install

2009-07-14 Thread v
my site folders web root at c:\inetpub\websites\mysite all cake in c:\inetpub\websites\mysite\cake as default structure index.php if (!defined('ROOT')) { define('ROOT', dirname(__FILE__).'\cake'); } /** * The actual directory name for the

Re: A Table Belongs to the Same Table

2009-07-14 Thread ecommy
you may want to check this: http://bakery.cakephp.org/articles/view/coding-a-self-join-in-a-cake-application On Jul 14, 9:04 am, si-mon wrote: > Hi All, > > I am creating a CRM application in cake php. In it, in my user table, > there are three levels of users viz. Director, Manager and Executiv

HABTM saving problem

2009-07-14 Thread cc_humbry
Hi, Can't figure this one out, not for the want of trying though. Models involved are Category, CandidateItem which are associated in each model as HABTM. I created a temp baked project to see if the association definition was correct and it appears to be. In my categories_controller I have a me

Re: var $useDbConfig not working - caching?

2009-07-14 Thread komaruloh
I'm not sure if it's all about cache. But perhaps you could add this option to your database.php var $default = array( . . . 'persistent' => false, . . . ); var $prod = array( . . .

Re: PHP 5.3.0 deprecated warnings

2009-07-14 Thread koljenovic
revert to 5.2.9-2 and all warnings are gone On Jul 12, 6:31 am, 10drill wrote: > I've just upgraded PHP to 5.3.0 on my development server and found all > of my Cake sites have about 20 warning messages starting with > "Deprecated: Assigning the return value of new by reference is > deprecated...

When/how do you publish Bakery articles?

2009-07-14 Thread GravyFace
I wrote a tutorial on CakePHP + EclipsePDT autocomplete almost a month ago and it hasn't been published yet. If there's a submittal/workflow I'm not aware of, let me know. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro

Render Xml

2009-07-14 Thread Paulos23
Hi peeps, I have spent much time in finding the proper solution for my problem.To be more specific i am parsing an xml document from an external site(using httpSocket) which contains some data.I have managed to parse it and when i do pr($parsed_xml) or debug ($parsed_xml) i get an array which cont

Re: var $useDbConfig not working - caching?

2009-07-14 Thread Jon Bennett
> How to switch DB connections based on environment automatically. > http://edwardawebb.com/programming/php-programming/cakephp/automatically-choose-database-connections-cakephp nice :) You can't do that in core.php or bootstrap.php or webroot/index.php though, as they aren't classes, so I think

Re: var $useDbConfig not working - caching?

2009-07-14 Thread Alastair
On Jul 14, 1:24 pm, Smelly Eddie wrote: > How to switch DB connections based on environment > automatically.http://edwardawebb.com/programming/php-programming/cakephp/automatica... > Thanks for this link, a slightly more robust solution! --~--~-~--~~~---~--~~ Y

Re: var $useDbConfig not working - caching?

2009-07-14 Thread Smelly Eddie
How to switch DB connections based on environment automatically. http://edwardawebb.com/programming/php-programming/cakephp/automatically-choose-database-connections-cakephp On Jul 14, 6:55 am, Alastair wrote: > Ahh lovely! That works perfect. Still not sure what was causing the > problem I've

Re: setFlash and redirect problem

2009-07-14 Thread Raph
Triple "s" in "Session" word. :/ Thx Kau-Boy. :) On 14 Lip, 13:40, Raph wrote: > There's still blank page. > > On 14 Lip, 12:28, M Naveed Akram wrote: > > > > > hey set your debug mode to 2 or 3 so that you can receive error message.. > > > On Tue, Jul 14, 2009 at 3:15 PM, jeff wrote: > > > ex

Re: setFlash and redirect problem

2009-07-14 Thread Raph
There's still blank page. On 14 Lip, 12:28, M Naveed Akram wrote: > hey set your debug mode to 2 or 3 so that you can receive error message.. > > > > On Tue, Jul 14, 2009 at 3:15 PM, jeff wrote: > > explain what problem exactly r u facing and also the code... > > > On Tue, Jul 14, 2009 at 3

submitting to cookbook

2009-07-14 Thread Krishnan. N
Hi, Sorry if this has been hashed before; searched very briefly The "How it works section" in the manual say: 3. Submit additions/edits for review using valid, semantic HTML. How best to submit? I have a working "add post" and some other stuff i could help with. thanks, krishnan --~--~-

SWFUpload -> can't debug

2009-07-14 Thread Jeroen
I just installed version 3.0 of SWFUpload. When I upload files in debug-mode, debug info like 'pr()' isn't displayed anymore. In fact it looks like if SWF-upload just upload the files, but does not return any data to the frontend. When the upload is finished I only get the message 'upload complete

Re: var $useDbConfig not working - caching?

2009-07-14 Thread Alastair
Ahh lovely! That works perfect. Still not sure what was causing the problem I've been discussing but it doesn't matter for the time being. Get that blogged! Or I'll do it :) On Jul 14, 11:31 am, Jon Bennett wrote: > hi Alastair, > > > > > > > Here's the content of my database.php file. Nothing

Re: setFlash and redirect problem

2009-07-14 Thread Raph
http://pastebin.com/m6b2da595 This action generates pdf with bill and sends it to client. Then It should redirect to another page. Everything works fine except this redirect. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

Re: var $useDbConfig not working - caching?

2009-07-14 Thread Jon Bennett
hi Alastair, > Here's the content of my database.php file. Nothing out of the > ordinary here? > > class DATABASE_CONFIG { > >        var $default = array( >                'driver' => 'mysql', >                'persistent' => false, >                'host' => 'localhost', >                'login

Re: setFlash and redirect problem

2009-07-14 Thread M Naveed Akram
hey set your debug mode to 2 or 3 so that you can receive error message.. On Tue, Jul 14, 2009 at 3:15 PM, jeff wrote: > explain what problem exactly r u facing and also the code... > > > > > On Tue, Jul 14, 2009 at 3:41 PM, Raph wrote: > >> >> Still the same problem. :/ If I remove "setFl

Re: setFlash and redirect problem

2009-07-14 Thread jeff
explain what problem exactly r u facing and also the code... On Tue, Jul 14, 2009 at 3:41 PM, Raph wrote: > > Still the same problem. :/ If I remove "setFlash" then is ok. > > On 14 Lip, 11:52, jeff wrote: > > use the foll: > > manner > > > > $this->Session->setFlash('User profile has be

Re: setFlash and redirect problem

2009-07-14 Thread Raph
Still the same problem. :/ If I remove "setFlash" then is ok. On 14 Lip, 11:52, jeff wrote: > use the foll: > manner > > $this->Session->setFlash('User profile has been updated.'); > $this->redirect('/users/home');    //    controller name/action > name > > > > > > On Tue, Jul 1

Re: setFlash and redirect problem

2009-07-14 Thread jeff
use the foll: manner $this->Session->setFlash('User profile has been updated.'); $this->redirect('/users/home');//controller name/action name On Tue, Jul 14, 2009 at 3:19 PM, Raph wrote: > > Hello! > > I have weird (I think) problem. In one of my actions I have the c

setFlash and redirect problem

2009-07-14 Thread Raph
Hello! I have weird (I think) problem. In one of my actions I have the code: $this->Sesssion->setFlash(__('Bill was sent by e-mail successfully', true)); $this->redirect(array('controller' => 'somecotroller'); and nothing happend. Redirection dosen't work, there's only blank screen. When I rem

Re: css class

2009-07-14 Thread jeff
To change the cakes css style make ur own css and place it in the default.ctp file in app/views/layout folder place this there css('your css file name');?> eg: css('styles');?> using this in default will set this style for all view pages... => alternativelty in the requried view page add

Re: A Table Belongs to the Same Table

2009-07-14 Thread Miles J
Do it like any other relation. Heres an example of my genre model. class Genre extends AppModel { var $belongsTo = array( 'Parent' => array( 'className' => 'Genre', 'foreignKey' => 'parent_id' ) );

Re: A Table Belongs to the Same Table

2009-07-14 Thread Miles J
On Jul 13, 11:04 pm, si-mon wrote: > Hi All, > > I am creating a CRM application in cake php. In it, in my user table, > there are three levels of users viz. Director, Manager and Executive. > > I need to include a field "reports_to" > Eg: executive1 reports_to manager1 >       executive2 repor

css class

2009-07-14 Thread Dhileepen Chakravarthy
Hi Everybody, i can able to change the existing css . but how do i use newly created css class into my .ctp file Regards, Dhileepen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this gr

Post Model with Tree Behavior and multiple types of child post

2009-07-14 Thread matt
Hi there, Could someone help me figure out what I'm doing wrong here? I have a Post model that acts as a tree. In my model I have var $belongsTo = array( 'Parent' => array( 'className' => 'Post', 'foreignKey' => 'parent_id' ) ); var $hasMany = array( 'Child'

Re: var $useDbConfig not working - caching?

2009-07-14 Thread Alastair
Hi Komaruloh, Thanks for your help. I actually have persistent set to false. Here's the content of my database.php file. Nothing out of the ordinary here? class DATABASE_CONFIG { var $default = array( 'driver' => 'mysql', 'persistent' => false,

Re: Retreiving values from Jquery to a controller in cakephp

2009-07-14 Thread jeff
=>i mean is there any way to get the value from jquery to a controller function => and if so how .. => or could u give me any tutorials regarding this issue => it could be veryhelpful =>thankz again On Tue, Jul 14, 2009 at 2:02 PM, jeff wrot

Re: Retreiving values from Jquery to a controller in cakephp

2009-07-14 Thread jeff
Thanx for the reply Dr. Loboto but could u tell me how to do that i mean requesting view_beer action by jQuery code i may sound stupid ...but the truth is i dont know how to do it --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: Retreiving values from Jquery to a controller in cakephp

2009-07-14 Thread Dr. Loboto
If you request your view_beer action by browser address bar, you'll see empty data as it is not AJAX and no parameters passed. When you request your view_beer action by that jQuery code you see filled data as it is AJAX and you passed data. On Jul 14, 1:28 pm, jeff wrote: > sorry > Dr. Loboto > w

Re: Convert this Mysql Statement to a cakePHP find array

2009-07-14 Thread Dr. Loboto
$this->PrintIssue->find( 'first', array ( 'fields' => array ('id', 'issue_date'), 'conditions' => array ('id >=' => 2043), 'page' => 46 ) ); On Jul 14, 1:09 pm, liaogz82 wrote: > Hi all, > > I am having some difficulty finding a cakePHP solution to this MySQL

Re: Categories with Tree behaviour -- how to pull?

2009-07-14 Thread Andreas Derksen
Hi, well what about simply do a find with the category id as a conditions? like: $this->Product->find('all', array('conditions' => array('categorie_id' => $cat_id))); never used the tree behavior, but what about http://book.cakephp.org/view/812/find-threaded ? greets Andreas rchavik schrieb:

Re: Tried to install another application inside cakePHP configuration

2009-07-14 Thread Dr. Loboto
Or install them into cake webroot, or edit cake root .htaccess to not pass openx, phpMyAdmin, phpBB and what other soft you install requests to cake. On Jul 14, 12:34 pm, saavedrajj wrote: > Hello everybody, inside my cakePHP configuration i want to install > the phpMyAdmin and phpBB forum > > h

Re: Categories with Tree behaviour -- how to pull?

2009-07-14 Thread rchavik
maybe use $conditions parameter of generatetreelist? http://book.cakephp.org/view/228/Basic-Usage#generatetreelist-517 On Jul 13, 8:07 am, rocket wrote: > I have a standard categories, and products, and am using the Tree > behvaiour for the Category model. > > For example I have: > > +Electroni

Re: Any dissadvantage to adding Containable behvior to all models

2009-07-14 Thread Miles J
No its basically what it was made for. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cak

HABTM relations

2009-07-14 Thread Claudiu Apetrei
Hello, I have a Users model and a dogbreeds model. Would like to add a habtm relation between the models. But I have 2 problems : 1) I want to add a type field, the relation should be : 1 for owner, 2 for fan_of_breed. 2) The relations can be set from two place, from the user profile, and from

Re: Convert this Mysql Statement to a cakePHP find array

2009-07-14 Thread RC
Possibly something like: $print_issues->find(array( 'fields' => array('id', 'issue_date'), 'limit' => 45, 'offset' => 1, 'conditions' => array( 'id >=' => 2043, ) ); Untested, not sure wether it'll work though. :) On Jul 14, 1:09 pm, liaogz82 wrote: > Hi all, > > I