How to make different model-data-array compatible

2010-01-29 Thread Freight
Hi,

I think find-method returns different data-arrays for recursive date.
However I want to use the userdata in the same index-element in
different actions. So there will be an error with the var-names.

MyModel:
Entry hasMany Users
Users belongsTo Group


Entry->find('first') returns an array like

'Entry' => ...
'User' => '0' => 'userid'
 => 'username'
 => 'Group' => 'groupid'
=> 'groupname'
'1' => ...


User->find('all') returns an array like

'0' =>
 'User' => 'userid'
=> 'username'
 'Group' => 'groupid'
  => 'groupname'
'1' => ...

How can I best get these both types compatible?

Thanks

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Getting Xdebug to work under CakePHP 1.2 and NetBeans 6.5

2009-08-24 Thread Freight

Hi,

take a look here:
http://groups.google.ch/group/cake-php/browse_thread/thread/73bcf80a3d626c75

For me I have to set the webroot correct to the cake-webroot-dir in
project-properties.

Greetz

On 20 Jul., 20:16, MarcS  wrote:
> have you (or anyone else) figured this out?
>
> On Jun 15, 2:26 am, kdubya  wrote:
>
> > I have recently switched from a plain text development style to using
> > NetBeans 6.5. I figured I might like some of the niceties of a real
> > IDE (I have used them before) but my main motivation was to get
> > debugging with breakpoints, watches etc.
>
> > So, I have gotten Xdebug (verision 2.0.4) to work with a simple "Hello
> > World" script outside of PHP. I can set breakpoints and inspect
> > variables. Great!
>
> > Only it doesn't work in a CakePHP project. Actually, if I leave the
> > debug setting on to "Stop at first line", it does breakpoint there.
> > Where it stops (it says) is in the index.php from the /app folder. So
> > I do F8 (Step Over) and it does not stop at the next line of code. It
> > skips 10 lines of code and stops there. Do it a few more times and it
> > skips random chunks of code. It then gets about 5 lines from the
> > bottom of the file and one F8 sends it running, not stopping at any of
> > the subsequent breakpoints that I have set.
>
> > As I'm stepping through the file, it actually looks like it is showing
> > me the wrong file (there are several index.php files after all). I've
> > tried to match up the line number to figure out where it really is but
> > no luck.
>
> > BTW, my development machine is running Window XP Pro SP2. My webserver
> > is Apache 2.0.50 and PHP is 5.2.5, if that makes any difference.
>
> > I have searched the newsgroup for answers to this. There are a couple
> > of posts that are similar (like getting Xdebug to work under Eclipse
> > PDT) but they gave me no help.
>
> > Thanks in advance for any suggestions.
>
> > Ken
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP-powered Forum best structure?

2007-11-04 Thread Freight

You can change the path to access your cakeapp on several ways. E.g.
htaccess, index.php, cake-route.

I would use a model also for forum.

Greetings

On 3 Nov., 17:29, mbleonardo <[EMAIL PROTECTED]> wrote:
> Hi all, I wanna start making a forum application with CakePHP and I'm
> asking for suggestions:
>
> What is the best structure for the application?
>
> I want it to run in a /forum subfolder, but I think the MVC structure
> doesn't help it.
>
> I think the best think to do is to create separate controller for the
> forums index, topics index and topics posts, but it won't be acessible
> by the /forum subfolder.
>
> The other way is to create a unique 'Forums' controller to manage
> everything, but it will get more complex using the model relations and
> MVC structure than making it by "pure" php.
>
> So, I conclude that the best thing to do would be to put the "forum
> controllers" in a subfolder, this way:
>
> /app/controllers/forum/index.php
> /app/controllers/forum/topics.php
> /app/controllers/forum/posts.php
>
> It's possible using CodeIgniter, but what about using Cake??
>
> Any other structures suggestions are welcomed.
>
> Thank You :)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How many models are possible with Cake?

2007-10-25 Thread Freight

Hello,

I am building a Webapp with Cake and love it very much. The
Application have about 30 models. The problem is, that it will
increase over the time. Now I wonder, if it could be better to divide
the Webapp into different CakeApps to reduce the amount of models per
CakeApp in future.

What do you think? How many models do you have succesfully in one
CakeApp? What do you think, is the max-number of possible Models, so
that Cake still works stable?

Greetings Freight


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: findAll and $recursive option

2007-08-27 Thread Freight

Have looked at this? Perhaps sixth parameter!

http://api.cakephp.org/class_model.html#63ade7d3c6d03c83ab53a224e23ad9dd


Model::findAll  (   $conditions = null,
$   fields = null,
$   order = null,
$   limit = null,
$   page = 1,
$   recursive = null
)

Returns a resultset array with specified fields from database matching
given conditions. By using the $recursive parameter, the call can
access further "levels of association" than the ones this model is
directly associated to.

Parameters:
mixed   $conditions SQL conditions as a string or as an
array('field' =>'value',...)
mixed   $fields Either a single string of a field name, or an
array of field names
string  $order SQL ORDER BY conditions (e.g. "price DESC" or
"name ASC")
int $limit SQL LIMIT clause, for calculating items per page.
int $page Page number, for accessing paged data
int $recursive The number of levels deep to fetch associated
records

Returns:
array Array of records public

Definition at line 1123 of file model_php5.php.

References $recursive, __resetAssociations(), afterFind(),
beforeFind(), ConnectionManager::getDataSource(), getID(), and
read().


On 27 Aug., 09:12, bunyan <[EMAIL PROTECTED]> wrote:
> Hello!
>
> I have three models - City, State and Vacancy.
>
> City belongs to state and vacancy belongs to city.
> Setting $this->Vacancy->recursive = 2 and then calling 
> $this->Vacancy->findAll() with no parameters returns the Vacancy, City and 
> State
>
> data. But if I call $this->Vacancy->findAll() with array of fields as
> a second parameter, $this->Vacancy->recursive is ignored, and I get
> only Vacancy and City data.
>
> How can I both use the fields array and "recursive" option?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Deactivate Sessions Completly

2007-07-31 Thread Freight

Hi,

I want completly deactivate the session functionalety from cake so
that no session is started at all. I tried to comment out CakeSession
and SessionComponent, however it hasnt the right effect.

Has anyone a clue, what to do?

Thanks
Freight


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using Cake with Zend Session or Cake without any Sessions?

2007-07-27 Thread Freight

Can I use Cake without any Session, even without Zend-Session?

On 26 Jul., 22:10, gwoo <[EMAIL PROTECTED]> wrote:
> Add Zend to your vendors directory. Write your own SessionComponent.
> use vendor('Zend/Session', 'Zend/Auth'); or whatever the path to the
> libs are. Create the methods you need like read, write, destroy.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cakephp Installation

2007-07-27 Thread Freight

Where is the problem exactly?

On 27 Jul., 15:07, saritha <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Iam unable to configure cakephp.I get confused.I have gone thru the
> manual also.pl help me in this manner.pl give your suggestions to
> configure cakephp to develope the application.And the steps needed to
> do it.
>
> Thanks,
> Saritha.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to run cakephp application

2007-07-26 Thread Freight

You best start with the Blog-Tutorial.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Using Cake with Zend Session or Cake without any Sessions?

2007-07-26 Thread Freight

Hi,

components of cake are great. However I want to use ZendSession in my
project for some reason. For example the Class ZendAuth is using
ZendSession to save Auth-Data. This is very nice :-)

So my question: Is there a convinient way to use ZendSession instead
of CakeSession?

My idea is first to deactivate all the CakeSession-Functionality. Can
I deactivate Sessions in Cake or are they designed in the core? So can
I use Cake without any session-handling?

Thanks Freight


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---