Browse By Letter (a php question)

2009-10-30 Thread gimperdan...@gmail.com
I am working on a project where I would like to have a menu to search by Letters. For instance: A | B | C | D |E and so on... However I only want to show the letters that correspond to a product on the database. So if I have product: Apple, and Banana I would show the letters: A | B

Re: Query (using "greater than")

2009-10-28 Thread gimperdan...@gmail.com
I was following the code and examples from a Book, not the book.cake. Sorry I wasn't clear on that. On Oct 6, 1:57 pm, brian wrote: > On Tue, Oct 6, 2009 at 12:20 PM, gimperdan...@gmail.com > > wrote: > > > thanks!! Maybe the book is outdated or just a typo. > > O

Select Distinct only for Unique fields?

2009-10-28 Thread gimperdan...@gmail.com
I am having a problem with SELECT DISTINCT This is what I have in my model: This works: $this->find('all', array('fields'=>array('DISTINCT Album.id', 'Album.year'), 'recursive'=>-1)); This Doesn't Work: $this->find('all', array('fields'=>array('DISTINCT Album.year'), 'recursive'=>-1)); Albu

Re: skipping the add() view?

2009-10-23 Thread gimperdan...@gmail.com
    } > > } > > Then redirect to the add/index-page and it'll display the validation > errors (The text you stored in the model) in a list in the session- > > >flash, just make sure you display that... > > Hope it helps! > > On 23 okt, 19:58, "gimperda

Re: skipping the add() view?

2009-10-23 Thread gimperdan...@gmail.com
I figured I can just do a redirect() but I can't figure out how to pass the validation errors along. Anyone? On Oct 23, 1:18 pm, "gimperdan...@gmail.com" wrote: > Ok, > > Here's the situation: > > I have a page that allows users to post comments, but thi

skipping the add() view?

2009-10-23 Thread gimperdan...@gmail.com
Ok, Here's the situation: I have a page that allows users to post comments, but this is not a ADD page... when I create the add() function in the CommentController it automatically looks for a add.ctp because it assumes that's where my form was. All the data gets saved, but it doesn't know wher

Re: need some help with routes...

2009-10-17 Thread gimperdan...@gmail.com
Router::connect('/artist/*/album/*', array('controller' => 'albums', > > 'action' => 'view')); > > > On Oct 15, 6:20 pm, "gimperdan...@gmail.com" > > wrote: > >> I am learning about routes now, I used to write

Having a couple of problems using recursive = 1

2009-10-16 Thread gimperdan...@gmail.com
Ok this is what I have set up: Artist -> hasMany Album Album -> belongsTo Artist Album -> belongsTo Label Album-> hasMany Track Label-> hasMany Album Track-> belongsTo Album so fa so good I provide the name of the Artist and the name of the Album and want to get results from each table: $t

Re: need some help with routes...

2009-10-16 Thread gimperdan...@gmail.com
AME'). > > Lapinski > > > > gimperdaniel wrote: > > > Ok, this is what I have now.. and it works.. can someone just tell me > > if it's the right way to do it? > > > Router::connect('/artist/*/album/*', array('controller' => 'albums&#

Re: need some help with routes...

2009-10-15 Thread gimperdan...@gmail.com
Ok, this is what I have now.. and it works.. can someone just tell me if it's the right way to do it? Router::connect('/artist/*/album/*', array('controller' => 'albums', 'action' => 'view')); On Oct 15, 6:20 pm, "gimperdan...@gm

need some help with routes...

2009-10-15 Thread gimperdan...@gmail.com
I am learning about routes now, I used to write my own routes on mod rewrites before i came to Cake, so I just need some small guidance since I already have some knowledge... Here's what I need to accomplish: www.myswebsite.com/artist/ARTISTNAME/album/ALBUMNAME On mod rewrite I just had to sub

Re: What to use? Elements? Behaviors? Helpers?

2009-10-14 Thread gimperdan...@gmail.com
> understand CakePHP > better:http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller > > Hope it helps somehow! > > On Wed, Oct 14, 2009 at 4:06 PM, gimperdan...@gmail.com < > > > > gimperdan...@gmail.com> wrote: > > > Ok... thanks for the tut

Re: What to use? Elements? Behaviors? Helpers?

2009-10-14 Thread gimperdan...@gmail.com
oard-for-... > > On Oct 14, 5:54 pm, "gimperdan...@gmail.com" > wrote: > > > I kinda understand what you're saying, but I am rather lost with some > > concepts in Cake. I have to read more first... Thanks... > > > PS: legal seu site! > > >

Re: What to use? Elements? Behaviors? Helpers?

2009-10-14 Thread gimperdan...@gmail.com
ike in your modesl, and once > you start doing that, you won't stop. It makes things really simpler! > > On Wed, Oct 14, 2009 at 11:57 AM, gimperdan...@gmail.com < > > > > gimperdan...@gmail.com> wrote: > > > Thanks. That helps a little. From what I've been reading

Re: What to use? Elements? Behaviors? Helpers?

2009-10-14 Thread gimperdan...@gmail.com
sites main index page. > > On 14 okt, 16:38, "gimperdan...@gmail.com" > wrote: > > > On the index of my website I get content from several different tables > > in the database. Which is best to use? Elements? Behaviors? or > > Helpers? As f

What to use? Elements? Behaviors? Helpers?

2009-10-14 Thread gimperdan...@gmail.com
On the index of my website I get content from several different tables in the database. Which is best to use? Elements? Behaviors? or Helpers? As far as I understand the index(home.ctp) page doesn't have a model or controller. --~--~-~--~~~---~--~~ You received thi

Re: Query (using "greater than")

2009-10-06 Thread gimperdan...@gmail.com
TE(Post.date) >'=> $date, >          'DATE(Post.date) <'=> $end_date > > ))); > > On Oct 6, 8:52 am, "gimperdan...@gmail.com" > wrote: > > > I am learning cake using a book, which has been great so far, but I am > > having problems

Beginners book!

2009-10-06 Thread gimperdan...@gmail.com
I am new to cake (not to php, but to cake) and thought this book to be great help. If you know your basic php it really should make cake much easier to understand. Beginning CakePHP - From Novice to Professional (Apress) --~--~-~--~~~---~--~~ You received this mess

Re: Cake Bake Error: I just cant BAKE, please help

2009-10-06 Thread gimperdan...@gmail.com
I don't know if this applies.. but i had problems running Bake because I have to use a socket to connect to the database. So I had to go to the database configuration file and add port=> PATH TO SOCKET On Oct 6, 8:57 am, "Prof. No Time" wrote: > Good day all, > > Each time I try baking in cake,

Query (using "greater than")

2009-10-06 Thread gimperdan...@gmail.com
I am learning cake using a book, which has been great so far, but I am having problems with one example of the book when it uses the "greater than" and similar operators in a query... here's what the books says: return $this->find('all',array( 'conditions'=>array( 'DATE(Post.date)

showEmpty?

2009-10-03 Thread gimperdan...@gmail.com
I am new to cake... i have been doing a lot of reading, but somethings i still can't figure out. This is what I have: echo $form->select('State', array('NJ' => New Jersey', 'NY' => 'New York')); I want to remove the empty option of this select box. According to the API I need to add $showEmpty