Re: array_key_exists php statement

2011-02-06 Thread chris...@yahoo.com
Ok,
I manage to do that...
here is what works



link($gift['GiftCategory']['name'], '/gifts/
category/' . $gift['GiftCategory']['name']) ?>







thanks
chris


On Feb 6, 10:00 pm, Tilen Majerle  wrote:
> wtf are u trying to do??
>
> {{{
>
> if (array_key_exists($gift['GiftCategory']['name'], $yourArray)):
>
> else:
>
> endif;
>
> if (array_key_exists('controller', $this->params) &&
> $this->params['controller'] == 'gifts'):
>
> else:
>
> endif;
>
> //better choice
> if (isset($this->params['controller']) && $this->controller == 'gifts')
> {
>
> }
> }}}
>
> --
> Lep pozdrav, Tilen Majerlehttp://majerle.eu
>
> 2011/2/7 chris...@yahoo.com 
>
>
>
>
>
>
>
> > Hi guys,...
> > how u ding...
>
> > I need help with php statement. I'm getting an error:
> > Parse error: syntax error, unexpected ';' in /home/zipmaniak/
> > zippopeople.com/html/app/views/gifts/admin_manage.ctp on line 93
>
> > 
>
> > Please some one help me with this...  or if I have to call from
> > controller,... how do I do that...?
>
> > params) && $this-
> > >params['controller'] == 'gifts' . ---WHAT ELSE IN
> > HERE ???--- )): ?>
>
> > Thanks
> > Chris
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > athttp://groups.google.com/group/cake-php

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


Re: array_key_exists php statement

2011-02-06 Thread chris...@yahoo.com
Hi Tinel,
Ok,.. here is the deal,... I'm trying to upload gifts,... but they are
not assign any categories yet, and I will add Category and Name and
Description later...
But for now, since it has no category and Category table (which is
like a theme to display later on a site) and which is connected thru
the Gift Model to GiftPhoto Model, ... I'm having that error. Which is
I wanna fix... Please tell me what $yourArray means ;) lol if I knew
that why would I ask... lol Please tell me what to do in here... the
whole code if possible...

thanks
chris


On Feb 6, 10:00 pm, Tilen Majerle  wrote:
> wtf are u trying to do??
>
> {{{
>
> if (array_key_exists($gift['GiftCategory']['name'], $yourArray)):
>
> else:
>
> endif;
>
> if (array_key_exists('controller', $this->params) &&
> $this->params['controller'] == 'gifts'):
>
> else:
>
> endif;
>
> //better choice
> if (isset($this->params['controller']) && $this->controller == 'gifts')
> {
>
> }
> }}}
>
> --
> Lep pozdrav, Tilen Majerlehttp://majerle.eu
>
> 2011/2/7 chris...@yahoo.com 
>
>
>
>
>
>
>
> > Hi guys,...
> > how u ding...
>
> > I need help with php statement. I'm getting an error:
> > Parse error: syntax error, unexpected ';' in /home/zipmaniak/
> > zippopeople.com/html/app/views/gifts/admin_manage.ctp on line 93
>
> > 
>
> > Please some one help me with this...  or if I have to call from
> > controller,... how do I do that...?
>
> > params) && $this-
> > >params['controller'] == 'gifts' . ---WHAT ELSE IN
> > HERE ???--- )): ?>
>
> > Thanks
> > Chris
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > athttp://groups.google.com/group/cake-php

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


Re: Pagination Problem in Custom Query

2011-02-06 Thread Name256
Hey,

Try the containable behaviour. It is designed specifically to filter
out related results ("Feeds" in your case).

On Feb 7, 3:48 am, Joseph Buarao  wrote:
> Hello Guys,
>
> Thanks for your help Guys, I have fixed the limit statement but still
> in problem, I think I found the problem not in my query it is in my
> data structure, I was trying to paginate the data in one category,
> here's my data structure
> Array
> (
>     [0] => Array
>         (
>             [Category] => Array
>                 (
>                     [id] => 1
>                     [name] =>
>                     [slug] => asian-food
>                 )
>
>             [Feed] => Array
>                 (
>                     [0] => Array
>                         (
>                             [id] => 1
>                             [url] =>http://steamykitchen.com/blog/feed
>                             [title] =>
>                             [popularity] => 7
>                             [error] => 0
>                             [ParseItem] => Array
>                                 (
>                                     [0] => Array
>                                         (
>                                             [id] => 796
>                                             [feed_id] => 1
>                                             [datetime] => 2011-01-28
> 11:12:42
>                                             [permalink] 
> =>http://feedproxy.google.com/~r/SteamyKitchen/~3/Jh82Omii8DQ/13565-chi...
>                                             [title] => Smoky Sweet
> Spicy Chipotle Cinnamon Wings
>                                             [excerpt] =>
>                                         )
>
>                                     [1] => Array
>                                         (
>                                             [id] => 121
>                                             [feed_id] => 1
>                                             [datetime] => 2011-01-28
> 11:12:42
>                                             [permalink] 
> =>http://feedproxy.google.com/~r/SteamyKitchen/~3/Jh82Omii8DQ/13565-chi...
>                                             [title] => Smoky Sweet
> Spicy Chipotle Cinnamon Wings
>                                             [excerpt] =>
>                                         )
>
>                                 )
>
>                         )
>
>                     [1] => Array
>                         (
>                             [id] => 3
>                             [url] 
> =>http://stickyrice.typepad.com/my_weblog/atom.xml
>                             [title] =>
>                             [popularity] => 8
>                             [error] => 0
>                             [ParseItem] => Array
>                                 (
>                                     [0] => Array
>                                         (
>                                             [id] => 127
>                                             [feed_id] => 3
>                                             [datetime] => 2011-01-19
> 04:58:22
>                                             [permalink] 
> =>http://stickyrice.typepad.com/my_weblog/2011/01/deck-of-the-fisherman...
>                                             [title] => Deck of the
> Fisherman
>                                             [excerpt] => Whenever I
> come
>                                         )
>                         )
>
>    as you can see here. there is only one category and inside of it
> there's a lot of feeds, that's why the paginate helper on cakephp did
> come out because it start counting, referring to limit in category not
> in the feeds, can you suggest to me guys how can I fix this. I want
> the limit statement working on the feeds not in category, because
> obviously it only has one category, so I want to limit the feeds
> result inside of that particular category and have a pagination..
> Thank you in advance again guys for you help..
>
> Joseph Buarao
> Web Developer
> Azure Web Design
>
> On Feb 6, 4:15 am, Jeremy Burns | Class Outfit
>
>
>
>
>
>
>
>  wrote:
> > It's 'limit' not 'limits'. Not sure if that's the only problem, but it's a 
> > starter.
>
> > Jeremy Burns
> > Class Outfit
>
> > jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> > On 5 Feb 2011, at 07:48, Joseph Buarao wrote:
>
> > > Hi Fellow Programmer,
>
> > > I getting problem with my code, I don't know what's the reason why the
> > > sql limit statement is not working on my paginate query. below are my
> > > codes feel free to suggest, I really Appreciated it.. Thank you in
> > > advance for your support GUYS...
>
> > > $this->paginate = array('conditions' =>  array('Category.slug'=>
> > > $category),
> > > 'limits' => 10);
>
> > > $feeds_data = $this->paginate('Category');
>
> > > By the way, I used hasAndBelongsToMany relationship..
>
> > > Thanks..
>
> > > Joseph Buarao
> > > Web Developer
> > 

Re: array_key_exists php statement

2011-02-06 Thread Tilen Majerle
wtf are u trying to do??

{{{

if (array_key_exists($gift['GiftCategory']['name'], $yourArray)):

else:

endif;

if (array_key_exists('controller', $this->params) &&
$this->params['controller'] == 'gifts'):

else:

endif;

//better choice
if (isset($this->params['controller']) && $this->controller == 'gifts')
{

}
}}}
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/2/7 chris...@yahoo.com 

> Hi guys,...
> how u ding...
>
> I need help with php statement. I'm getting an error:
> Parse error: syntax error, unexpected ';' in /home/zipmaniak/
> zippopeople.com/html/app/views/gifts/admin_manage.ctp on line 93
>
> 
>
> Please some one help me with this...  or if I have to call from
> controller,... how do I do that...?
>
> params) && $this-
> >params['controller'] == 'gifts' . ---WHAT ELSE IN
> HERE ???--- )): ?>
>
> Thanks
> Chris
>
> --
> 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+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

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


Re: array_key_exists php statement

2011-02-06 Thread Jeremy Burns | Class Outfit
As the error says;

> 

Sent from my iPad

On 7 Feb 2011, at 05:56, "chris...@yahoo.com"  wrote:

> Hi guys,...
> how u ding...
> 
> I need help with php statement. I'm getting an error:
> Parse error: syntax error, unexpected ';' in /home/zipmaniak/
> zippopeople.com/html/app/views/gifts/admin_manage.ctp on line 93
> 
> 
> 
> Please some one help me with this...  or if I have to call from
> controller,... how do I do that...?
> 
> params) && $this-
>> params['controller'] == 'gifts' . ---WHAT ELSE IN
> HERE ???--- )): ?>
> 
> Thanks
> Chris
> 
> -- 
> 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+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

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


array_key_exists php statement

2011-02-06 Thread chris...@yahoo.com
Hi guys,...
how u ding...

I need help with php statement. I'm getting an error:
Parse error: syntax error, unexpected ';' in /home/zipmaniak/
zippopeople.com/html/app/views/gifts/admin_manage.ctp on line 93



Please some one help me with this...  or if I have to call from
controller,... how do I do that...?

params) && $this-
>params['controller'] == 'gifts' . ---WHAT ELSE IN
HERE ???--- )): ?>

Thanks
Chris

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


simple page request

2011-02-06 Thread zer0_gravity
Using the controller to do a simple page request that show the results
from find()/read() after passing the $id of the record being queried ,
what else can I do using a simple page request?

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


Re: Pagination Problem in Custom Query

2011-02-06 Thread Joseph Buarao
Hello Guys,

Thanks for your help Guys, I have fixed the limit statement but still
in problem, I think I found the problem not in my query it is in my
data structure, I was trying to paginate the data in one category,
here's my data structure
Array
(
[0] => Array
(
[Category] => Array
(
[id] => 1
[name] =>
[slug] => asian-food
)

[Feed] => Array
(
[0] => Array
(
[id] => 1
[url] => http://steamykitchen.com/blog/feed
[title] =>
[popularity] => 7
[error] => 0
[ParseItem] => Array
(
[0] => Array
(
[id] => 796
[feed_id] => 1
[datetime] => 2011-01-28
11:12:42
[permalink] =>
http://feedproxy.google.com/~r/SteamyKitchen/~3/Jh82Omii8DQ/13565-chipotle-cinnamon-wings-recipe.html
[title] => Smoky Sweet
Spicy Chipotle Cinnamon Wings
[excerpt] =>
)

[1] => Array
(
[id] => 121
[feed_id] => 1
[datetime] => 2011-01-28
11:12:42
[permalink] =>
http://feedproxy.google.com/~r/SteamyKitchen/~3/Jh82Omii8DQ/13565-chipotle-cinnamon-wings-recipe.html
[title] => Smoky Sweet
Spicy Chipotle Cinnamon Wings
[excerpt] =>
)



)

)

[1] => Array
(
[id] => 3
[url] => 
http://stickyrice.typepad.com/my_weblog/atom.xml
[title] =>
[popularity] => 8
[error] => 0
[ParseItem] => Array
(
[0] => Array
(
[id] => 127
[feed_id] => 3
[datetime] => 2011-01-19
04:58:22
[permalink] =>
http://stickyrice.typepad.com/my_weblog/2011/01/deck-of-the-fisherman.html
[title] => Deck of the
Fisherman
[excerpt] => Whenever I
come
)
)

   as you can see here. there is only one category and inside of it
there's a lot of feeds, that's why the paginate helper on cakephp did
come out because it start counting, referring to limit in category not
in the feeds, can you suggest to me guys how can I fix this. I want
the limit statement working on the feeds not in category, because
obviously it only has one category, so I want to limit the feeds
result inside of that particular category and have a pagination..
Thank you in advance again guys for you help..


Joseph Buarao
Web Developer
Azure Web Design

On Feb 6, 4:15 am, Jeremy Burns | Class Outfit
 wrote:
> It's 'limit' not 'limits'. Not sure if that's the only problem, but it's a 
> starter.
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 5 Feb 2011, at 07:48, Joseph Buarao wrote:
>
>
>
>
>
>
>
> > Hi Fellow Programmer,
>
> > I getting problem with my code, I don't know what's the reason why the
> > sql limit statement is not working on my paginate query. below are my
> > codes feel free to suggest, I really Appreciated it.. Thank you in
> > advance for your support GUYS...
>
> > $this->paginate = array('conditions' =>  array('Category.slug'=>
> > $category),
> > 'limits' => 10);
>
> > $feeds_data = $this->paginate('Category');
>
> > By the way, I used hasAndBelongsToMany relationship..
>
> > Thanks..
>
> > Joseph Buarao
> > Web Developer
> > Azure Web Design.com
>
> > --
> > Our newest site for the community: CakePHP Video 
> > Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help 
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@go

Using EmailComponent inside a component or abstract controller

2011-02-06 Thread Johnny Cupcake
To the best of my knowledge, both of these are impossible in CakePHP
1.3.6:

- Use EmailComponent inside another component to send a message
- Create a controller class BETWEEN AppController and the child
controllers in the inheritance hierarchy, that uses EmailComponent to
send a message

I would appreciate conformation that I am correct, or a trivial code
sample to show how I am wrong.  And if either of these are possible in
Cake 1.3.7, please let me know.  Thanks.

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


Re: Book format change

2011-02-06 Thread Sam Sherlock
As Cricket says post this info to lighthouse cakebook project
add all the information you can about the issue.

Screenshot should help you can upload files with the ticket
and you can open a lighthouse account with openid if you like.

Iceweasel is possibly a more unique browser (perhaps you could use
chrome/firefox - in the meantime)

if this were open to a vote I imagine it would be a landslide in favour of
the new format
IMHO it far surpasses the old format

 - S



On 6 February 2011 18:35, Jesse  wrote:

> Hi, Cricket.  You didn't include the last line of my message in your
> reply.  This last line explains the issue I am having:
>
> The new format has no index that I can find.
>
> Am I just missing something?  There is search, but no index of pages
> or TOC like the older documentation had.
>
> On Feb 5, 6:34 pm, cricket  wrote:
> > On Sat, Feb 5, 2011 at 6:34 AM, Jesse  wrote:
> > > It seems the format for "the book" has changed significantly (http://
> > > book.cakephp.org/)
> >
> > There's at least one other active thread about the book changes.
> >
> > > The new format is not working well on Iceweasel, or may be more
> > > generally broken.
> >
> > Please file a ticket.
> http://cakephp.lighthouseapp.com/projects/43067-cookbook
> >
> > Or, if you're going to mention it here on the list, please AT LEAST
> > tell us more than "not working well". Your homework for the weekend is
> > to ponder why that's completely useless information to anyone that
> > might be in a position to do anything about it.
> >
> > > If we're voting, I vote for the older version of
> > > the documentation.
> >
> > We're not voting.
>
> --
> 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+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

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


Re: Book format change

2011-02-06 Thread Jesse
Hi, Cricket.  You didn't include the last line of my message in your
reply.  This last line explains the issue I am having:

The new format has no index that I can find.

Am I just missing something?  There is search, but no index of pages
or TOC like the older documentation had.

On Feb 5, 6:34 pm, cricket  wrote:
> On Sat, Feb 5, 2011 at 6:34 AM, Jesse  wrote:
> > It seems the format for "the book" has changed significantly (http://
> > book.cakephp.org/)
>
> There's at least one other active thread about the book changes.
>
> > The new format is not working well on Iceweasel, or may be more
> > generally broken.
>
> Please file a ticket.http://cakephp.lighthouseapp.com/projects/43067-cookbook
>
> Or, if you're going to mention it here on the list, please AT LEAST
> tell us more than "not working well". Your homework for the weekend is
> to ponder why that's completely useless information to anyone that
> might be in a position to do anything about it.
>
> > If we're voting, I vote for the older version of
> > the documentation.
>
> We're not voting.

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


Re: Table prefix bug in 2.0.0-dev when deleting?

2011-02-06 Thread Matthias
I also wonder why there are joins, but they are there automatically...
I tried $this->Workshop->WorkshopDescription->contain() before the
deleting, but then only the SELECT statement is contained (without
joins), the following delete is again with joins.
I also tried the 2. parameter for delete: delete($id, false), but that
doesn't change the query.

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


Re: Table prefix bug in 2.0.0-dev when deleting?

2011-02-06 Thread John Andersen
Oh, forget it! My bad :) You are deleting, so the should be no
associations used in the query!
Enjoy,
   John

On 6 Feb., 16:15, John Andersen  wrote:
> Make sure that you have associated your models correctly as described
> in the CakePHP book 
> at:http://book.cakephp.org/view/1039/Associations-Linking-Models-Together
>
> Also it is a good idea to show the same associations here in the
> thread, so that we may comment on them!
>
> Enjoy,
>    John
[snip]

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


Re: Table prefix bug in 2.0.0-dev when deleting?

2011-02-06 Thread John Andersen
Make sure that you have associated your models correctly as described
in the CakePHP book at:
http://book.cakephp.org/view/1039/Associations-Linking-Models-Together

Also it is a good idea to show the same associations here in the
thread, so that we may comment on them!

Enjoy,
   John

On 6 Feb., 15:06, Matthias  wrote:
> Sorry for double post...
> The above statement is the first that appears in the sql debug table,
> directly followed by the delete statement:
>
> DELETE `WorkshopDescription` FROM `cosy_workshop_descriptions` AS
> `WorkshopDescription` LEFT JOIN `description_categories` AS
> `DescriptionCategory` ON
> (`WorkshopDescription`.`description_category_id` =
> `DescriptionCategory`.`id`) LEFT JOIN `cosy_workshops` AS `Workshop`
> ON (`WorkshopDescription`.`workshop_id` = `Workshop`.`id`) WHERE
> `WorkshopDescription`.`id` = 3  1146: Table
> 'cosynt.description_categories' doesn't exist

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


Re: Any chance to get the $_SERVER variable or Configure::write Settings into a shell?

2011-02-06 Thread parallel32
DD, I just had this same issue and resolved it (for me).

There's a couple ways to solve this.  On my servers (centos 5) the env
variables retrieved from _SERVER are available from the cli but they
are a subset of the ones available from http.  And cronjobs are even
fewer than cli env variables as I have come to find.  So it  really
just all depends on what user crontab runs as.  I like the idea of
setting a php.ini variable to find your environment but if php.ini
changes and sometimes it does with php version updates, this could
break.  I chose to use the HOSTNAME env variable.  You can set this in
your .bash_profile for whichever user crontab runs as.  Or you can set
it globally in /etc/profile.  Or you can just set it in your crontab
entry like so:

*  *  *   *   *   HOSTNAME=dev.domain.com;export
HOSTNAME;/path/to/execute/your/cakeshell/script

You can set any env variable using anyone of those ways.

Hope this helps

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


Re: Table prefix bug in 2.0.0-dev when deleting?

2011-02-06 Thread Matthias
Sorry for double post...
The above statement is the first that appears in the sql debug table,
directly followed by the delete statement:

DELETE `WorkshopDescription` FROM `cosy_workshop_descriptions` AS
`WorkshopDescription` LEFT JOIN `description_categories` AS
`DescriptionCategory` ON
(`WorkshopDescription`.`description_category_id` =
`DescriptionCategory`.`id`) LEFT JOIN `cosy_workshops` AS `Workshop`
ON (`WorkshopDescription`.`workshop_id` = `Workshop`.`id`) WHERE
`WorkshopDescription`.`id` = 3  1146: Table
'cosynt.description_categories' doesn't exist

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


Table prefix bug in 2.0.0-dev when deleting?

2011-02-06 Thread Matthias
I'm trying to execute the following command in my WorkshopController:

$this->Workshop->WorkshopDescription->delete($id);

WorkshopDescription belongs to DescriptionCategory and Workshop, which
have the underscored tables description_category and workshop. I'm
using a prefix called "cosy_".

SELECT `WorkshopDescription`.`description_category_id`,
`WorkshopDescription`.`workshop_id` FROM `cosy_workshop_descriptions`
AS `WorkshopDescription` LEFT JOIN `description_categories` AS
`DescriptionCategory` ON
(`WorkshopDescription`.`description_category_id` =
`DescriptionCategory`.`id`) LEFT JOIN `cosy_workshops` AS `Workshop`
ON (`WorkshopDescription`.`workshop_id` = `Workshop`.`id`) WHERE
`WorkshopDescription`.`id` = 1 LIMIT 1  1146: Table
'cosynt.description_categories' doesn't exist

The join to cosy_workshops is correct, but regarding the descriptions
it's description_categories instead of cosy_description_categories.
Looks like a bug, or is there something else I could have done wrong?
It only appears when deleting, not when finding.

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