Re: The best practice for using external APIs

2008-09-01 Thread bitkidoku
Thank you Daniel :) This was the thing I was looking for. On Sep 1, 5:07 pm, Daniel Hofstetter <[EMAIL PROTECTED]> wrote: > Hi, > > > I need to generate an excel file and I am using an external API to > > generate that excel file. If I wasn't using CakePHP I could include() > > API's php file in

Re: Defining hasOne - from which direction?

2008-09-01 Thread bitkidoku
Hi again, Yes, if you define another hasOne relationship you have to add another foreign key. Because of this, it is good to plan, write down the models and the relationships between models before starting coding. Besides adding another foreign key to an existing table is not too much hassle. I

Re: Defining hasOne - from which direction?

2008-09-01 Thread bitkidoku
Hello, > Person hasOne Address > Company hasOne Address > > Address belongsTo Person > Address belongsTo Company This one seems the best way to do it. Imagine if you ever needed to enter multiple addresses for one Person, you only need to change the relation from hasOne to hasMany. What are you

The best practice for using external APIs

2008-09-01 Thread bitkidoku
Hello everyone, I need to generate an excel file and I am using an external API to generate that excel file. If I wasn't using CakePHP I could include() API's php file in my code and start writing it directly. Since I am using CakePHP I am trying to avoid doing stupid things that will break the

Re: find group parameter problem (GROUP BY problem)

2008-08-29 Thread bitkidoku
I opened a ticket: https://trac.cakephp.org/ticket/5357 On Aug 29, 6:36 pm, bitkidoku <[EMAIL PROTECTED]> wrote: > Yes, I am very sure, I have corrected local version of CakePHP and > checked the repository, and I didn't see any changes made that way in > the repository. A

Re: find group parameter problem (GROUP BY problem)

2008-08-29 Thread bitkidoku
Yes, I am very sure, I have corrected local version of CakePHP and checked the repository, and I didn't see any changes made that way in the repository. And there are no open tickets about this issue. On Aug 29, 4:34 pm, Rafael Bandeira aka rafaelbandeira3 <[EMAIL PROTECTED]> wrote: > > Should I

Re: find group parameter problem (GROUP BY problem)

2008-08-29 Thread bitkidoku
Just as I suspected, in dbo_mssql.php GROUP BY clauses are not included. Should I open a bug report for this? On Aug 29, 3:03 pm, bitkidoku <[EMAIL PROTECTED]> wrote: > A correction, I said it returns all the sales, that is not true, I get > the following error: > >

Re: find group parameter problem (GROUP BY problem)

2008-08-29 Thread bitkidoku
es it have something to do with it? On Aug 29, 2:59 pm, bitkidoku <[EMAIL PROTECTED]> wrote: > Hello all, > > I am having problems executing a GROUP BY query. Let's say I have > 'sales'  table containing 'id', 'product_id' and 'reven

find group parameter problem (GROUP BY problem)

2008-08-29 Thread bitkidoku
Hello all, I am having problems executing a GROUP BY query. Let's say I have 'sales' table containing 'id', 'product_id' and 'revenue'. I am trying to find total revenue of a different products. So far I did: $sales = $this->Sale->find( 'all', array( 'fields' => array('Sale.prod

Re: Clean urls in search form

2008-08-26 Thread bitkidoku
I am not aware of any cleaner way of doing it works fine in > the cases I have used this technique. > > /Martin > > On Aug 21, 2:10 pm, bitkidoku <[EMAIL PROTECTED]> wrote: > > > Hello everyone, > > > I am implementing a search form. But I want to make se

Re: Clean urls in search form

2008-08-21 Thread bitkidoku
Thanks for the answers. I will look into it and write the results here to share with everyone. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroup

Clean urls in search form

2008-08-21 Thread bitkidoku
Hello everyone, I am implementing a search form. But I want to make search results linkable like: "http://somehost/products/search/keyword"; (keyword is the word that is being searched). What is the best practise to achieve this? And what if the user could search defining many parameters like ti

Re: Model->find() using group parameter

2008-08-21 Thread bitkidoku
right, thank you. On Aug 20, 5:37 pm, teknoid <[EMAIL PROTECTED]> wrote: > It's a feature, find('list') is usually done to build options for a > select box. > > On Aug 20, 8:39 am, bitkidoku <[EMAIL PROTECTED]> wrote: > > > What about using &#x

Re: Model->find() using group parameter

2008-08-20 Thread bitkidoku
;Amit Badkas" <[EMAIL PROTECTED]> wrote: > 2008/8/20 Amit Badkas <[EMAIL PROTECTED]> > > > > > > > 2008/8/20 bitkidoku <[EMAIL PROTECTED]> > > >> Hello everyone, > > >> I am using CakePHP to build an application that will

Re: Model->find() using group parameter

2008-08-20 Thread bitkidoku
Oh, I just got here to reply my own question, and there are two answers already. Thanks for the answer! On Aug 20, 3:12 pm, "Amit Badkas" <[EMAIL PROTECTED]> wrote: > 2008/8/20 Amit Badkas <[EMAIL PROTECTED]> > > > > > > > 2008/8/20 bitkidoku <[

Model->find() using group parameter

2008-08-20 Thread bitkidoku
Hello everyone, I am using CakePHP to build an application that will run on en existing database. The problem I am facing is simple, I have products table and let's say it is like this: id, name, supplier Some stupid programmer (yes I am angry to him) didn't created the table with supplier_id. S

hasMany relation and retrieving data

2008-07-23 Thread bitkidoku
Hi everyone, I have a question about using find() and retrieving some data. Let's say I have two models Product and Category. Product belongsTo Category, Category hasMany Product. I am using $this->Category- >find('all'); to retrieve every category and related products. But there are some categori

Re: MSSQL ntext problem

2008-07-16 Thread bitkidoku
tput, and/or > running the query in Enterprise Manager to get to a more informative > error message. > > On Jul 15, 8:22 am, bitkidoku <[EMAIL PROTECTED]> wrote: > > > When I change the source it works fine. But when I try to extend the > > driver I get the sa

Re: MSSQL ntext problem

2008-07-15 Thread bitkidoku
} $fields[$i] = "{$fieldName} AS {$fieldAlias}"; } $fields[$i] = $prepend . $fields[$i]; } } return $field

Re: MSSQL ntext problem

2008-07-11 Thread bitkidoku
Thanks, good idea indeed. I added that to my todo list. On Jul 11, 3:38 pm, Nate <[EMAIL PROTECTED]> wrote: > You don't need to change the source.  Just extend the driver and > override the correct method. > > On Jul 10, 8:45 pm, bitkidoku <[EMAIL PROTECTED]> wro

Re: Translate behaviour documentation

2008-07-11 Thread bitkidoku
I have the same problem, I think it is missing. I am trying to solve the mystery from the API reference, which is not very easy. On Jul 9, 4:05 pm, boyracerr <[EMAIL PROTECTED]> wrote: > I've been searching using whatever terms I can think of, and I can't > find anything about the use of the Tran

Re: MSSQL ntext problem

2008-07-10 Thread bitkidoku
]; > >                                                 $fieldName  = > > $this->name($build[0] . '.' . $build[1]); > >                                                 $fieldAlias = > > $this->name(preg_replace("/^\[(.+)\]$/", "$1", > > $build[0]) . '__' . $fieldAlias); > >                

MSSQL ntext problem

2008-07-10 Thread bitkidoku
Hi everyone, I have a problem using my existing MSSQL DB. I get the following error: "SQL Error: Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier. [CORE\cake\libs\model\datasources \dbo_source.php, line