I found the solution in another forum... here it is:
header("Content-Disposition: attachment; filename=\"export.csv\"");
header("Content-type: text/csv");
The important part is the "Content-Disposition".. this tells the
browser not to try to open it directly by using its plugin.
So the user sti
Hi,
I am using the email component for sending (themed) HTML emails...
This works fine as long as I am doing this in "normal" web application
mode.
But when I am doing the very same thing inside a Cake Shell task, my
template somehow gets messed up.
Two problems occur:
1. More than 70 characte
Hi everyone,
I've googled a lot but did not find any solution to this problem:
We are offering some CSV data export in our web application.
This will open a CSV file in a new browser window via javascript.
In that new browser window you usually get asked if you want to save
or open the file...
OK, I finally made it with this 'join' parameter, that works... but
that is not much better than using ->query ;-) A little bit better
at least...
I still think there is a bug because I went to the IRC Cake group
yesterday evening and discussed the problem, and someone told me that
I should set
Found out the reason for my problems by now:
When I am telling cake in the 'fields' parameter that I want only
something from ModelA or ModelB, then cake only JOINs as far as
necessary in his eyes.
It does not care about the conditions which would need the deeper
JOINs.
So, how do I tell cake t
OK, here they are:
class ModelA extends AppModel {
var $name = 'ModelA';
var $useTable = 'ModelA';
var $primaryKey = 'id';
var $belongsTo = array(
'ModelB' => array('className' => 'ModelB', 'foreignKey' =>
'modelb_id')
);
}
class ModelB extends AppMode
I am already working a lot with linking models together, but not in
that recursive way, mostly only with one belongsTo relation.
But your hint "specifing the count in the 'fields' array" was a good
step in the right direction, I finally got the correct SELECT
statement created by cake ;-)
The
Hi together,
I have problems to create a count query with recursive conditions...
To clear up things, I ll try to make an example:
We have 4 tables:
ModelA, ModelB, ModelC, ModelD
They are connected like this:
- ModelA contains a FK to ModelB.
- ModelB contains a FK to ModelC.
- ModelC conta
with the latest official release it is fixed... was a temporary bug
somehow...
--~--~-~--~~~---~--~~
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 unsubsc
Today I updated my cake from version 1.2.0.5875 to 1.2.0.6311.
I am using it with an Oracle DB.
Now I am getting a strange behaviour with update and delete
operations...
An update now looks like:
UPDATE SAMPLETABLE Sampletable LEFT JOIN SOMEJOINTABLE Somejointable
ON (Sampletable.fkid = Somejo
Finally the answer ;-)
Thanks a lot grigri... now at least I know where the problem is... I
will try to add some code to enable functions in Oracle...
If I am successful... where would be the right place to post such a
bugfix? Sorry for that n00b-question but I did not actively develop
cake befo
@AD7six: Im in no hurry fortunately ;) So I prefer to use this group
and hopefully help others with the same problem. IRC cant be found by
googling.
Hm if you say mysql_fetch_field is responsible for the parsing of the
answer, then it might have something to do with the fact that Im using
Cake wi
using aliases does not help, because the problem occurs before the
"as"... the problem is the "." and the "," in the function. This
causes cake to think that a new table/column begins and this messes up
the array, I think.
So if I us an alias, the array still will have the assosiation
"my_custom_
using functions... or only use on in the
end of the string? Or does anyone have a rabbit hidden in his had for
me?
On 29 Mai, 17:53, "b logica" <[EMAIL PROTECTED]> wrote:
> What happens if you put the function call last in your query?
>
> On Thu, May 29, 2008 at 9:47 AM,
> It sounds to me like you are asking the wrong question - what sql is
> getting executed.
>
> AD
Since I am using the query function of a model the executed SQL is
correct, its just the string that i supply. That is not the problem. I
already used the debug mode to see what gets executed.
The
OK here you are:
>From my example above the returned array would look like:
[0]
[users]
[id] => 1234
[name] => Johnson
[my_custom_function(users]
[id] => somesamplevalue
[1].
So, obviously he thinks that "my_custom_function(users" is a tables
name because it
I need to do some complex queries with functions involved. I can call
them with the query (or execute) method of any model, but the result
gets splitted by cake in an array, and there it gets messed up,
because cake is trying to split the results in table names and column
names.
Example:
select
17 matches
Mail list logo