Friday, October 1, 2010

Re: cakephp dynamic databases.

Couldn't store this data in a separate database that just has log in details?

On 30 Sep 2010, at 20:06, nithiz wrote:

Hi all,

im developing an application which has the cakephp installed on 1
server and has a login system for customers to connect to their own
databases.

Now my question is, is there an alternative for manualy entering all
customers (1000+) in the database.php config file?

I have all my customers in a local database with all their database
configurations. So my default in my database.php config in cakephp is
the local database with all my customers.

I have done this one time before by having my app_controller do a
beforeFilter() and retrieve the database configurations from my local
database depending on a login + pass. (although, this caused problems
every time..)

Thanks in advance :)

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

Re: Using multiple domains on one app to create four seperate sites

You can use apache's namevirtualhost directive plus server aliases to point all the domains to the same web root. After that all you have to do is inspect the hostname in the $SERVER super global and use that to switch the app's theme (this gives you the flexibility to have domain specific layouts, views and elements) or just switch the layout. A good place to deal with this is the beforefilter callback.

On Oct 1, 2010, at 9:26 AM, Jacob <jacobsteringa@gmail.com> wrote:

> Hello all,
>
> I am working on a website for a company, which needs five different
> websites. The five websites use the same database and mostly the same
> records. For site specific records there is a 'company' column in the
> table. With a parameter a function will know what records to get.
>
> The current setup exists of one app on the webroot en 4 others in a
> sub directory. This was the easiest way to solve the problem, but it
> has a down site. As the development is in a final stage, the
> controllers and views are modified a lot. For every change the other
> four apps need to be changed also.
>
> My question is:
> Is there a way to create the illusion of five different websites while
> it is actually one app? For example, based on the domainname used, the
> layout changes? (that would be the best solution I think) But is it
> possible en how should this be done?
>
> Best regards,
>
> Jacob
>
> 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

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

Using multiple domains on one app to create four seperate sites

Hello all,

I am working on a website for a company, which needs five different
websites. The five websites use the same database and mostly the same
records. For site specific records there is a 'company' column in the
table. With a parameter a function will know what records to get.

The current setup exists of one app on the webroot en 4 others in a
sub directory. This was the easiest way to solve the problem, but it
has a down site. As the development is in a final stage, the
controllers and views are modified a lot. For every change the other
four apps need to be changed also.

My question is:
Is there a way to create the illusion of five different websites while
it is actually one app? For example, based on the domainname used, the
layout changes? (that would be the best solution I think) But is it
possible en how should this be done?

Best regards,

Jacob

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

Re: find with null

I'm afraid not.

'title IS'=>null
produces: SQL: (`title ` IS = NULL)

:(

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

Newbie

Hi all,
I'm an intermediate level PHP developer, and i'm gonna learn
CakePHP. but i don't know how to start with it. However i know a bit
about MVC pattern, though i don't know about the convention and syntax
of Cakephp. I've had a videotutorial of cakephp, in which i learn, how
to bake a cakephp. So in brief, i want to know , how can i learn
syntaxes used in cakephp. Thanx in advance.

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

using multiple pagination fails

hi,

so far i am using one $paginate variable to find data from a habtm
relation (user habtm products).

public $paginate = array('Product' => array('limit' => 10, 'joins' =>
array(
array(
'table' => 'products_users',
'alias' => 'ProductUser',
'type' => 'inner',
'conditions'=> array('ProductUser.product_id =
Product.id')
),
array(
'table' => 'users',
'alias' => 'User',
'type' => 'inner',
'conditions'=> array(
'User.id = ProductUser.user_id'
)
))));


I echo the result in an element called "paging" and include the
element in my view, so you can see on a users profile what products he
has. for transparency i defined a limit of 10 result, showed in a div.

<div id="paging">
<?php echo $this->element('users/paging'); ?>
</div>

It works fine. but now i want to give profile visitors the opportunity
to see ALL products of that user and not just 10.

the IDEA: you click on a link a popup opens showing ALL products. so i
thought i just define another $paginate variable "$paginate_all"
without setting a limit and render it in a new view...

but i get the error

call to undefinded method UserController:: paginate_all() in .......

did i sth wrong or can't I just define multiple $paginate variables?

thank you :)

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

want to use database store procedure with cakephp

Hi
any body has any idea ,how to use store procedure with cakephp


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