Re: self join and HABTM relation

2012-04-06 Thread Brian Bowler
What have you tried so far?

On Fri, Apr 6, 2012 at 5:10 AM, Reza Talamkhani
reza.talamkh...@gmail.comwrote:

 Hi
 I need to create a 'posts' table in db and show related posts to users...
 need to self join and HABTM (hasAndBelongsToMany) relation...
 please help me

 --
 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: redirecting problem

2012-04-02 Thread Brian Bowler
Litto some more information would help, is it redirecting to a blank page
instead of redirecting?

On Mon, Apr 2, 2012 at 9:15 AM, Mike Griffin griff...@gmail.com wrote:

 On Fri, Mar 30, 2012 at 09:42, LITTO CHACKO li...@axtecindia.com wrote:
  hai guys, i have to met with other problem.. the problem is that whwn
  i tried to submit a form  it saves all data nad when it is asked
  to redirect after saving it..it doesn't work???
 
   if ($this-Email-send()) {
 
$this-
 redirect('/seller/message/');
}
  }
 
  it will enter this loop..but after that it is not performing the
  redirection action?? why??
 

 Is the command spread over two lines like in the email?

 How do you know it is going into that loop? Did you try removing if
 ($this-Email-send()) { and just testing the redirect on its own?

 Is there a path at /seller/message?

 You could try changing the redirect line to something like
 $this-redirect(array('controller' = 'sellers', 'action' = 'message'));

 Are there any checks in the message action that might be redirecting
 back to where it came from?

 Mike.

 --
 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: Database configuration problem

2012-03-27 Thread Brian Bowler
That usually means that you didn't close out one of your brackets or
something. Can you post the code (sensitive details omitted)?

On Tue, Mar 27, 2012 at 9:27 AM, AKinwunmi Damilare damilareak...@gmail.com
 wrote:

 Yes it helped. Thanks. But its giving an error saying expecting
 T_function in one of the lines. Pls, help. Thanks

 On Mar 27, 12:57 pm, vaughany paulie...@gmail.com wrote:
  This may be of some use:
 
  http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html#...
 
 
 
 
 
 
 
  On Tuesday, 27 March 2012 12:11:03 UTC+1, AKinwunmi Damilare wrote:
 
   Please, i need help in the cakephp database configuration. 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


-- 
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: How do I redirect?

2012-03-19 Thread Brian Bowler
Please do I have the exact same problem and would like to know if you get
this fixed.

On Mon, Mar 19, 2012 at 10:56 AM, glevine levine.g...@gmail.com wrote:

 Right, so in the example I was mainly just wanting to show that I was
 reaching those points in the code. Theoretically, if I remove the print
 'before redirect'; statement then I should never see after redirect but
 I should see in the index upon the new page load (since that is post
 redirect).

 For some reason, I was still unable to redirect when I wasn't printing to
 the screen before the call to exit. However, I may have just been tired and
 didn't realize I still had a print before exit. So I'll try again and
 respond back with the results.

 Thanks


 On Monday, March 19, 2012 7:56:28 AM UTC-4, euromark wrote:

 no you can't! or: you really shoudn't
 you should simply do everything before redirecting.

 theoretically, you can manually call exit() if you set the exit param to
 false on redirect.
 but to me this makes no sense.


  can we do some process after redirect.

   --
 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: $this-redirect not working

2012-03-11 Thread Brian Bowler
@Geore, I have tried taking it out and what happens is that it goes to the
'/formulas/instructions/' page minus the ID variables. I assume this
happens because this is happening because of POST. I either want to
redirect to a different page such as 'formulas/manage' (for example) or
redirect to '/formulas/instructions/78' (for example) so that the users
aren't confused. However what happens is that it gets redirected to a blank
page and when I view the page's source it also comes up blank. If I through
a debug in there it shows up with a blank page with the output of a debug
on it.

@Romel and @Vijay, same thing happens it just comes up completely blank.


On Sun, Mar 11, 2012 at 12:01 AM, romel javier gomez herrera 
bmxquiksilver7...@gmail.com wrote:

 try with this  $this-redirect($this-referer());


 El 10 de marzo de 2012 21:24, Brian Bowler bbowle...@gmail.com escribió:

 So I have this function where the user can add the weight to materials
 and save them. However after the updateAll, $this-redirect doesn't work at
 all and the result shows up with a blank page with nothing in the source.
 In an ideal world I would have it redirect to a different page but at a
 minimum I would like it to go back to the page where they entered in the
 weights.

   public function instructions($id = null) {
 $instructions = $this-Formula-findFormula($id);
 $count = count($instructions);
 $this-set(array('instructions' = $instructions, 'count' =
 $count, 'formulaId' = $id));
 if(!empty($this-data)) {
 $count = count($this-request-data);
 for($i = 0; $i = $count; $i++) {
 $this-Formula-updateAll(
 array('Formula.weight' =
 $this-request-data['Formula'][$i]['weight']),
 array('Formula.id' =
 $this-request-data['Formula'][$i]['id'])
 );
 }
 }
 $this-redirect(array('controller' = 'instructions', 'action' =
 'instructions', $id));
 }

 I have no idea what causes this. Any help is much appreciated, even if
 its just telling me where in the manual to read up on it.

 --
 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


-- 
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


$this-redirect not working

2012-03-10 Thread Brian Bowler
So I have this function where the user can add the weight to materials and
save them. However after the updateAll, $this-redirect doesn't work at all
and the result shows up with a blank page with nothing in the source. In an
ideal world I would have it redirect to a different page but at a minimum I
would like it to go back to the page where they entered in the weights.

  public function instructions($id = null) {
$instructions = $this-Formula-findFormula($id);
$count = count($instructions);
$this-set(array('instructions' = $instructions, 'count' =
$count, 'formulaId' = $id));
if(!empty($this-data)) {
$count = count($this-request-data);
for($i = 0; $i = $count; $i++) {
$this-Formula-updateAll(
array('Formula.weight' =
$this-request-data['Formula'][$i]['weight']),
array('Formula.id' =
$this-request-data['Formula'][$i]['id'])
);
}
}
$this-redirect(array('controller' = 'instructions', 'action' =
'instructions', $id));
}

I have no idea what causes this. Any help is much appreciated, even if its
just telling me where in the manual to read up on it.

-- 
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