I use to bindModel again with hasMany and use the filterQuery to
count.
On Feb 25, 8:33 am, Adam Royle <[EMAIL PROTECTED]> wrote:
> If you want to sort on the column as well, I suggest you create a
> "counter cache". Basically, you store the count of subitems in a field
> in the main table, which
If you want to sort on the column as well, I suggest you create a
"counter cache". Basically, you store the count of subitems in a field
in the main table, which is updated on create/update/delete.
There is even a behaviour that can do this automatically for you.
http://bakery.cakephp.org/articl
Hi friends I've implemented cake blog tutorial from cake manual and
it's work perfect.But i'm confuse how cake model save method
works.Means
this blog tutorial use posts table
CREATE TABLE posts (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(50),
body TEXT,
created DA
Hi friends I've implemented cake blog tutorial from cake manual and
it's work perfect.But i'm confuse how cake model save method
works.Means
this blog tutorial use posts table
CREATE TABLE posts (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(50),
body TEXT,
created DA
One of the things about Cake that I'm not so hot about is having to
give up (mostly) writing SQL. For some people, that's a feature, I
guess.
Anyway, don't fight the framework ;-) Do your find() on Posts,
grabbing Comments along with them. When iterating over them in the
view, you can simply do a
Actually, I really should have mentioned that I don't think I can
answer either of those with a great deal of confidence (I've never
used either) Sorry about that. I just wanted to chip in on the render
point.
On Sun, Feb 24, 2008 at 1:26 PM, mason k <[EMAIL PROTECTED]> wrote:
>
> Thanks for the
You guys thought of everything. That's pretty sweet.
On Sun, Feb 24, 2008 at 5:36 PM, nate <[EMAIL PROTECTED]> wrote:
>
> Some older versions of Postgres won't tell you the sequence name for a
> column (I think the earliest version I've tested on is 8.1 or so). In
> those cases, you need to d
This may be silly since there is a better to do this I'm sure, but is
there a way to count the number of items in a subselect on pagination?
Or is there a way to count the number of items that are linked in a
hasMany relationship. i.e. can you output the number of comments that
are associated with
I am trying to use the mail component on my contact page (
http://www.theskateparkdirectory.com/contact/ ) and I get the
following message:
Missing Component File
You are seeing this error because the component file can't be found or
doesn't exist.
Notice: If you want to customize this error me
I am trying to use the email component on my contact page, but when
trying to add the component in my controller I get:
Missing Component File
You are seeing this error because the component file can't be found or
doesn't exist.
Notice: If you want to customize this error message, create app/v
I am facing the error in ConnectionManager::getDataSourcewhile dynamic
database switching logic in the model
// theme.php code
requestURL = $_REQUEST['url'];
if(substr_count($this->requestURL, '/
unicode'))
{
Hi,
I'm trying to use the inputs method to logically group a couple of
textfields but I haven't figured out how to specify the legend of the
fieldset. For example:
inputs(array('ftp_user',ftp_password')); ?>
Creates the fieldset but with a default legend of "New Server" (where
Server is the nam
Well I'm a beginner too, but I can start you out with some
encouragement at least, and some advice. First of all, I think you've
chosen the right framework: It sounds like your application is exactly
what CakePHP was built for. Here's the process that I've gone through,
which has worked for me.
1)
You only need to configure your config/database.php, as follows:
var $default = array(
'driver' => 'sqlite',
'database' => 'path/to/sqlite/file.db'
);
If the file is relative to your app path, you may need to declare the
constructor in the DATABASE_CONFIG class and use the path con
If your controller is using the model you want to use for saving, then
store the controller on startup of your component.
Afterward you can use the controller reference to save the data.
Something like this in you component :
function startup(&$controller)
{
$this->controller = $controller;
My database has all the table and field names in caps. I notice that
the queries which display in Debug 2 are also caps.
In any case, I played around with the case on my model's table and
field names but nothing seemed to change anything. However, as soon as
I misspelt a word the alarm bells ra
how do i save to a database in a component in cakephp 1.2?
for example: in my component, i have var $uses = array('MyModel');
then I do $this->MyModel->save(.)...
how do i do this?
thanks
--~--~-~--~~~---~--~~
You received this message because you are subscri
That wasn't sarcasm. You were right.
On Feb 24, 8:17 pm, nate <[EMAIL PROTECTED]> wrote:
> All I'm really saying is, try and show a little respect. I don't
> think that's too much to ask.
>
> On Feb 24, 6:44 pm, jim starboard <[EMAIL PROTECTED]> wrote:
>
> > I have say, I love how I'm put in my
All I'm really saying is, try and show a little respect. I don't
think that's too much to ask.
On Feb 24, 6:44 pm, jim starboard <[EMAIL PROTECTED]> wrote:
> I have say, I love how I'm put in my place in this group. I think I
> finally found a home.
>
> On Feb 24, 6:39 pm, nate <[EMAIL PROTECTED
Where can I find a simple demo using SQLite?
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, s
The responses to tickets relating to this issue in trac usually have
"wontfix" and a short non-explainatory note basically saying "piss off
and stop asking you don't need this, we know best".
-Ben
--~--~-~--~~~---~--~~
You received this message because you are sub
Have the "with" association's for HABTM been documented yet? Can't
seem to find any info.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.co
Hello!
I'd like to get started using Cake, but so far I haven't had a lot of
luck. I've been attempting to follow the excellent "Cook up Web sites
fast with CakePHP, Part 1" hosted at:
http://www-128.ibm.com/developerworks/edu/os-dw-os-php-cake1.html
My first attempt involved using CakePHP 1.2
I've decided to build a new site that will be a directory of
skateparks where users can submit skateparks along with photos, get
directions, rate and comment on parks, etc and I'm going to try and
use cakePHP to do this. I must say that just starting out, I feel like
i've gotten way in over my hea
I am working on ACL and I think I'm almost there at getting it to work
properly.
I have the following objects:
Aros:
---
Group
|- Group.1
|- User.1
--
User.1 inherits all of Group.1's permissions, this works fine
Acos:
-
Post
|-Pos
Hello!
I'd like to get started using Cake, but so far I haven't had a lot of
luck. I've been attempting to follow the excellent "Cook up Web sites
fast with CakePHP, Part 1" hosted at:
http://www-128.ibm.com/developerworks/edu/os-dw-os-php-cake1.html
My first attempt involved using CakePHP 1.2
I have say, I love how I'm put in my place in this group. I think I
finally found a home.
On Feb 24, 6:39 pm, nate <[EMAIL PROTECTED]> wrote:
> On Feb 24, 6:19 pm, jim starboard <[EMAIL PROTECTED]> wrote:
>
> > Already there. 3 weeks old. Hard to believe it's not fixed.
>
> Maybe it's because we
On Feb 24, 6:19 pm, jim starboard <[EMAIL PROTECTED]> wrote:
> Already there. 3 weeks old. Hard to believe it's not fixed.
Maybe it's because we've got about two week's worth of fixes and
various other enhancements to do.
Maybe it's because, in the grand scheme of things, scaffolding isn't
reall
Not really sure why this is allowed, but there are places where
inserts are handled with an empty string for an auto-increment
primarykey id. This fails with any strict setup of a db, if there is
auto increment.
There is 3 week old trac listing for this but it really boggles the
mind why you woul
Already there. 3 weeks old. Hard to believe it's not fixed.
On Feb 18, 9:35 am, "Pablo Viojo" <[EMAIL PROTECTED]> wrote:
> This IS what you should do:
>
> 1. Fill a ticket
> 2. submit a patch [1]
>
> Regards,
>
> --
> Pablo Viojo
> [EMAIL PROTECTED]://pviojo.net
>
> [1]https://trac.cakephp.org/
>
Just found out that my hint was wrong...
use
/**
* Checks if given data is valid
*/
private function isHtmlFormFileData($data)
{
if(!is_array($data)) {
return false;
}
if(!array_key
Hello,
I am a complete newbie with CakePHP but am loving it so far! I have a
quick question:
I followed the quick 5 minute tutorial here:
http://www.grahambird.co.uk/cake/tutorials/scaffolding.php
This builds a quick example of a bookmarks manager. Which has a really
cool table layout that is o
Some older versions of Postgres won't tell you the sequence name for a
column (I think the earliest version I've tested on is 8.1 or so). In
those cases, you need to do as Chris says, and provide the sequence
name in the model class using var $sequence.
On Feb 23, 12:12 pm, "b logica" <[EMAIL PR
Try this at your component:
var $issuers = array();
function doDirectoryrequest() {
$issuerArray = array('YOUR DATA');
foreach($issuerArray as $issuer)
{
$this->issuers[$issuer['issuerID']] = $issuer['issuerName'];
}
return $this->issuers;
}
And keep your controller
One could argue that since the unit test coverage in 1.2 is much
higher than in 1.1, that 1.2 is more production ready than 1.1. At
least that's what Nate said at CakeFest.
On Feb 23, 3:42 pm, Greg Baker <[EMAIL PROTECTED]> wrote:
> I know its beta.. But I'm wondering if people are using 1.2 in
Thanks guys! You helped me a lot.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL
On Feb 24, 8:27 pm, smacks <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> I'm currently working on a content management system (yah, I know ...)
> and I would need to have the following URL's linked to a
> "fileController", because I would need the users to be able to manage
> the files on their webs
I don't understand "the default database to 'master' for the login"...
And how do you import a mysql database into microsoft sql server?
thanks in advance
Gil
On 22 fév, 12:21, Stege <[EMAIL PROTECTED]> wrote:
> On 21 Feb., 18:08, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello
This happens because a webroot/files folder exists. Try deleting the folder.
Regards,
--
Pablo Viojo
[EMAIL PROTECTED]
http://pviojo.net
On Sun, Feb 24, 2008 at 4:27 PM, smacks <[EMAIL PROTECTED]> wrote:
>
> Hi guys,
>
> I'm currently working on a content management system (yah, I know ...)
>
Hi guys,
I'm currently working on a content management system (yah, I know ...)
and I would need to have the following URL's linked to a
"fileController", because I would need the users to be able to manage
the files on their webserver.
URL's:
"mycms/files" (linked to action->index in fileContro
Thanks for the answer, but I'd love a little more guidance myself.
Can you answer OP's Q1, which is the difference between $ajax->form
and $ajax->submit?
Also, please explain the $this->render('view','ajax'); line of code?
There is nothing in the API (http://api.cakephp.org/1.2/
class_controller.
I just tried that. Now I don't need the for loop, but it still gives
me the same result.
On 24 feb, 14:38, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> Have you tried Set::combine($issuerArray, '{n}.issuerID', '{n}.issuerName' );
>
> On 2/24/08, Ronald <[EMAIL PROTECTED]> wrote:
>
--~--~---
On Sat, Feb 23, 2008 at 10:34 PM, Bruce <[EMAIL PROTECTED]> wrote:
>
> As you say, it looks like it is not reading the names of the sequence
> correctly somewhere along the line.
I ran into this using postgres as well. Just make sure to define the
sequence in the model itself
var $sequence =
That must do the trick! I changed the case for one fieldname in my
jointable and also my HABTM model didn't work anymore. But i've set
Configure::write('debug', 1); in app/config/core.php so I was told
right away that this was the problem. Please set your debugging to 1,2
or 3 and tell us what is
Right you are. I just went back and checked and found it in
$this->params['form']. That was one of the first things I checked,
though. But I've fiddled around a bit, so there was probably something
else misconfigured when I checked that array.
Thanks!
On Sat, Feb 23, 2008 at 9:50 PM, Dardo Sordi
I have to wonder if 'action' is acting like a keyword to disrupt things.
On Sat, Feb 23, 2008 at 10:34 PM, Bruce <[EMAIL PROTECTED]> wrote:
>
> Since the last message, I have created a new table, model, controller
> and views from scratch with new names and the same structure - the
> problem s
My take on the documentation was that the behavior supported additions
to the table schema (and that group was optional). I'll try it with
the default.
This is how I'm making it work for the moment. This is included in my
controller action right after doing a find():
$sql = 'SELECT dirname, base
On Sun, Feb 24, 2008 at 10:25 AM, Carl <[EMAIL PROTECTED]> wrote:
>
> I guess the real question is what do I pass as a reference to the
> model? I tried passing $this-> and &$this-> and neither
> one works.
If you are using CakePHP 1.2, you can do the following:
$this->->schema()
and it retu
I searched the forum before posting, but didn't find an answer to my
question. And I am talking about getting the info in the controller,
not the view. The API says that I should pass a reference to the model
to the describe function, but nothing I pass seems to work. I thought
the model is $this-
On Sun, Feb 24, 2008 at 12:31 AM, Cefleet <[EMAIL PROTECTED]> wrote:
>
> Ok I tried to follow this example.
>
> http://bakery.cakephp.org/articles/view/taking-advantage-of-the-pages-controller
> to get rid of the pages name
> but my problem is I didn't know where to put this.
>$Route->con
I assume you mean passing a model to a view?
This is generally discouraged, in favour of getting whatever
information you need from the model in the controller, and passing it
on to the view.
You'd have to describe your issue more fully, or search the board more
thoroughly - there's plenty of po
Perhaps you need to rename the join table to groups_users (ie. lowercase).
It does not require a PK, though.
On Sun, Feb 24, 2008 at 11:59 AM, villas <[EMAIL PROTECTED]> wrote:
>
> Hi Ape,
>
> I tried your test too. I substituted groups and users in place of
> your artices tags, of course.
Hi Ape,
I tried your test too. I substituted groups and users in place of
your artices tags, of course.
Did NOT work.
Here is my latest model for group.php:
class Group extends AppModel {
var $name = 'Group';
var $useTable = 'groups';
var $hasAndBelongsToMany = array(
Corie,I tried your test, but it still did NOT work! Any more
ideas?
The only thing I can think of is that HABTM doesn't work with
Firebird.
I suppose I'll have to load the same test with MySql and verify that.
I'll let you know.
As I said previously, all the SQL queries seem to fire correct
I guess the real question is what do I pass as a reference to the
model? I tried passing $this-> and &$this-> and neither
one works.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this gr
For his excellent presentation @ FOSDEM 2008 this afternoon.
Hope more people will join the ship :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@goog
Ah to bad :p i guess i will have to write queries again hehe :)
On Feb 24, 2:52 pm, Marcos Hernández <[EMAIL PROTECTED]>
wrote:
> Hi!!
> Y have the same problem here. I works fine if you don't set any conditions,
> but there's no way if you try to filter (WHERE). The best solution I've found
>
Hi Technoguru,
I hope I understood your problem right:
Have you setup Eclipse to use the phpeditor as editor for *.thtml ,
*.ctp and *.php files? See instructions on the article you mentioned:
http://bakery.cakephp.org/articles/view/setting-up-eclipse-to-work-wi...
If so: does the outline windo
Hi Villas,
HABTM works without any problem. Maybe because I was just being lazy
and just 'baked' my models. Hereby a working example of a working
HABTM model:
article.php:
class Article extends AppModel {
var $name = 'Article';
var $useTable = 'articles';
var $primaryKey
I've followed that article and it works great. I'm not an expert in
eclipse, my only experience with it was that tutorial. So, once it
worked, never touched it again.
I have this directory layout:
$HOME/php/ <--- the webroot and eclipse workplace
cak
C'mon the framework name is "Cake" (I love it), you can't complain
about "automagically".
Altough this is not the place to ask, don't you think that in the
Requirements section of the manual also should say "Sense of humor" ?
LOL
On 2/23/08, BlenderStyle <[EMAIL PROTECTED]> wrote:
>
> I actual
Hi!!
Y have the same problem here. I works fine if you don't set any
conditions, but there's no way if you try to filter (WHERE). The best
solution I've found googling was to change the relationship from HABTM
to a HasMany/BelongsTo combination. Well, I don't know what you think
but for me is
Try a pr(); of the data fetched from db, also have a look at :
http://manual.cakephp.org (specially the blog tutorial)
http://book.cakephp.org
On 2/24/08, Vitved <[EMAIL PROTECTED]> wrote:
>
> Hi everyone
>
> I'm doing a website for a friend, and wanted to try out cakephp, but
> i've ended up
Have you tried Set::combine($issuerArray, '{n}.issuerID', '{n}.issuerName' );
On 2/24/08, Ronald <[EMAIL PROTECTED]> wrote:
>
> I know that, but the data does not come from my database, but from an
> API that delivers it in a specific format.
> I just need to know what I have to do with the $i
I know that, but the data does not come from my database, but from an
API that delivers it in a specific format.
I just need to know what I have to do with the $issuerArray to turn it
over to another array that I can return to the controller that is
calling this component and from there use it to
Ok I tried to follow this example.
http://bakery.cakephp.org/articles/view/taking-advantage-of-the-pages-controller
to get rid of the pages name
but my problem is I didn't know where to put this.
$Route->connect('/*', array('controller' => 'pages', 'action' =>
'display'));
so i just tried to go
Hi everyone
I'm doing a website for a friend, and wanted to try out cakephp, but
i've ended up in a dead-end.
I have a table containing dog-races. Some of the characteristics of a
given race is referred to another table e.g. size.
I've figured out how to grab the data in the "size" table and use
Make sure your svn:externals property is uses the repository at
https://svn.cakephp.org/repo/branches/1.2.x.x/cake. I had the same
problem as you where I was stuck at revision 6311, although svn
reported that I was at the latest revision, because I was using the
trunk.
>From the root directory o
Taka,
I'm fairly new to Cake myself but can tell you that is you have your
model setup correct to link the tables then this INSERT, UPDATE,
DELETE will be taken care of (see further below). If you are running
the INNER JOIN as some custom code in the controller then you are
pretty much on
I am doing a find on a Tag model.. and this finds all the articles on
the Article model, but is there a way to retrieve the articles with
the related tags inside the article array? Setting the recursive
higher does not work? :(
--~--~-~--~~~---~--~~
You received thi
Hey,
>
> I don't know if that syntax is correct for overriding the defaults.
>
The syntax and how you're overriding the defaults is correct.
> Warning (2): Invalid argument supplied for foreach() [APP/models/
> behaviors/attachment.php, line 233]
>
This has been fixed in 0.40
> id | 41
The following works for me:
$this->Dealer->Country->displayField = 'name';
$countries = $this->Dealer->Country->find('list');
$this->set('countries', $countries);
This will return an array like this:
Array
(
[1] => Netherlands
[2] => Belgium
[3] => Germany
[4] => France
)
The
Hi Tomka,
Do you have something like
$session->flash();
in your layout/view?
Hope that helps,
--
Daniel Hofstetter
http://cakebaker.42dh.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To po
Hello,
I've finished project(1.2.0.6311) for a client and now i'm trying to
run it on production host(shared-server). Unfortunately after setting
all up i'm not able to make the site working. On the development
server everything works perfectly, but the production server is giving
me some unexpe
Hello.
I'm using 1.2 beta and tried some baked code:
In my controller:
function view($id = null) {
$this->Session->setFlash(__("Invalid Place.", true));
$this->redirect(array("action" => "index"));
}
debug-Level is set to 2:
Configure::write('debug', 2);
If i request this action in the
75 matches
Mail list logo