can't get CRUD to run

2007-09-29 Thread SIXS
Hi,
I have installed a new version or XAMPP and Cakephp.
I get the cake page with and database found
Http://localhost/cake/
I build the controllers players_controller.php and teams_controller.php.
I build the models player.php and team.php
I run Http://localhost/cake/teams/add and I get and error 
Object Not Found Error 404
What is the problem. I have check the models and controllers for spelling erors 
.
None found.
Also The page I get is white not yellow.
Any help will be appreciated.
Jim

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



GoogleBot gets a 404 on site with out index.php

2007-09-29 Thread Alex Jeffery

Hi,

I have a strange issue where I have installed cakePHP and it looks
like it works fine.
If I browse to http://AlexJeffery.org/ I see what I would expect.
How ever googlesite maps says it gets a 404 on http://AlexJeffery.org/

I have tried several spiders to generate a sitemap and they all get a
404 on http://AlexJeffery.org/
If I point them to http://AlexJeffery.org/index.php they can find that
and spider correctly.

I tried adding the following line to the .htaccess in the app/webroot
DirectoryIndex index.php
But it still gets a 404

Any ideas on how to fix this?
I would like my sitemap to work :)

Thanks,
Alex


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to generate URL without ':' that has argument.

2007-09-29 Thread JadB

Overwrite the 'router.php' file found in /cake/libs with a copy of it
in your /app/ folder and then change the following:

/**
 * Separator used to join/split/detect named arguments
 *
 * @var string
 * @access private
 */
var $__argSeparator = ':';

Just replace it with whatever separator you wish to use. That's the
way I'd do it I presume.

Jad
http://myeasyscripts.com/loudbaking


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Edit Action in Cake 1.2 Crashes Apache (XAMPP) on Windows

2007-09-29 Thread Tom.Maiaroto

$html->tagValue()

is what caused the crash for me. Yes, it is deprecated in 1.2, but I
would have thought a warning/error message would have popped up like
most other things that are deprecated - rather than just crashing
apache.

Yes it was my code at fault (as suspected)...but a good note for
anyone upgrading from 1.1 to 1.2
Many things that you need to convert you can see from error messages,
but this is one that you have to find by trial and error like I did,
or just know to change when upgrading...and it may only be a problem
crashing certain installations of apache. Who knows...and if it's a
larger problem crashing apache, that's not good if someone were to
maliciously use the bug in handling the error to crash systems
somewhere. Or just unknowingly crash some server by mistake when they
didn't mean to. As I'm sure theres many other easier ways to crash
servers and again it could just be my setup on Windows that wasn't
configured properly to handle the error as well.



On Sep 29, 7:10 pm, "Tom.Maiaroto" <[EMAIL PROTECTED]> wrote:
> It seems that any normal edit action in any controller is crashing my
> apache server.
>
> Found out when upgrading from 1.1 to 1.2. At first I thought maybe
> some error popped up in a bad way from the html->input's being changed
> to form->input's and other deprecated code ... logical. It was the
> only thing that I changed was the 1.2 upgrade and that was the only
> thing really to change right?
>
> Maybe not. The add action works fine. Even barked with deprecated code
> errors until I fixed those.
>
> Maybe something else I'm missing. Trying to work through it, will post
> a solution if I find one for others, but figured I'd start discussino
> this to see if anyone else had an answer.
>
> 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, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Edit Action in Cake 1.2 Crashes Apache (XAMPP) on Windows

2007-09-29 Thread Tom.Maiaroto

more specifically than $html->tagValue()
it's where/how that is used.

link($html->image("admin/page_delete.gif") . '
Delete','/settings/delete/' . $html->tagValue('Setting/id'),
array("style"=>"text-decoration: none;"), 'Are you sure you want to
delete: id ', false);?>

On Sep 29, 7:10 pm, "Tom.Maiaroto" <[EMAIL PROTECTED]> wrote:
> It seems that any normal edit action in any controller is crashing my
> apache server.
>
> Found out when upgrading from 1.1 to 1.2. At first I thought maybe
> some error popped up in a bad way from the html->input's being changed
> to form->input's and other deprecated code ... logical. It was the
> only thing that I changed was the 1.2 upgrade and that was the only
> thing really to change right?
>
> Maybe not. The add action works fine. Even barked with deprecated code
> errors until I fixed those.
>
> Maybe something else I'm missing. Trying to work through it, will post
> a solution if I find one for others, but figured I'd start discussino
> this to see if anyone else had an answer.
>
> 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, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Why is "findAll()" not reading one field

2007-09-29 Thread Mike Green

Is it ok that we call moma rodriques on that number???



On 29/09/2007, Conrad <[EMAIL PROTECTED]> wrote:
>
> I was trying to read a field named 'check_num'.  I changed the field
> name to 'draft'  (and throughout the logic) and it all works now.  Go
> Figure!
> Conrad
>
> On Sep 29, 1:43 pm, Conrad <[EMAIL PROTECTED]> wrote:
> > AD,
> > Using EITHER Cake or normal PHP, the value in the 'check_num' field,
> > although valid in the table, is not being read.
> > The field is filled IN THE TABLE, but not in the associative array
> > (either $this->data, or  $row = mysql_fetch_assoc() )
> >
> > This does not appear to be a "cake" problem, as normal PHP does the
> > same thing.
> >
> > Conrad
> >
> > On Sep 29, 4:29 am, AD7six <[EMAIL PROTECTED]> wrote:
> >
> > > On Sep 29, 9:12 am, Conrad <[EMAIL PROTECTED]> wrote:
> >
> > > > I tried using the straight php code:
> > > >   $resultID = mysql_query("SELECT * FROM dailypays");
> > > >for ($x= 0; $x < mysql_num_rows($resultID); $x++)
> > > >{
> > > >  $row = mysql_fetch_assoc($resultID);
> > > >  ...
> > > > $this->set('row',$row);
> > > > -
> > > > this produced the same results.  This (other than the  $this->set() )
> > > > did not use any cakePHP
> >
> > > > Any answers anybody?
> >
> > > Are you saying that the array key is missing in results (what I
> > > originally understood), or that the value is different. If it's the
> > > latter (what I now understand) I would check your table definitions
> > > are correct as perceived by cake (pr($ModelInstance); and see where
> > > this info goes missing (trace where the code goes for model->findAll,
> > > find the db call and from there walk the code to find the
> > > disappearance.)
> >
> > > hth,
> >
> > > AD
>
>
> >
>


-- 

Mike Green

Find yourself some misspelled ebay bargains!
http://www.typingwand.com

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Like DEBUG 2: "x queries took y ms" without warnings and queries?

2007-09-29 Thread bigbass

Hi happy bakers,

is there an easy way to display the line 'x queries took y ms' in my
app (cake 1.1.x) without warnings and the queries-table? (Just like
DEBUG set to 2)
I didn't dig into the code yet, (and don't like core-mods anyway) but
it would be cool to have that for debugging purpose.

Any ideas welcome :)

Bassy regards,
Benjamin


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Edit Action in Cake 1.2 Crashes Apache (XAMPP) on Windows

2007-09-29 Thread Tom.Maiaroto

It seems that any normal edit action in any controller is crashing my
apache server.

Found out when upgrading from 1.1 to 1.2. At first I thought maybe
some error popped up in a bad way from the html->input's being changed
to form->input's and other deprecated code ... logical. It was the
only thing that I changed was the 1.2 upgrade and that was the only
thing really to change right?

Maybe not. The add action works fine. Even barked with deprecated code
errors until I fixed those.

Maybe something else I'm missing. Trying to work through it, will post
a solution if I find one for others, but figured I'd start discussino
this to see if anyone else had an answer.

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, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Another HABTM self referencing question - cannot save data?

2007-09-29 Thread red

I think that I worked out better solution for this.

The model relation:

var $hasAndBelongsToMany = array(
'Friend' =>
array('className' => 'User',
'joinTable' => 'users_users',
'foreignKey' => 'user_id',
'associationForeignKey' => 'friend_id',
),
'Admirer' =>
array('className' => 'User',
'joinTable' => 'users_users',
'foreignKey' => 'friend_id',
'associationForeignKey' => 'user_id',
),
);

The controller:
function addfriend($friend_id = null) {
$this->data = $this->User->read(array('id'), $this->obAuth-
>getUserId());

$friends = array();
foreach ($this->data['Friend'] as $friend) {
$friends[] = $friend['id'];
}
$friends[] = $friend_id;

$admirers = array();
foreach ($this->data['Admirer'] as $admirer) {
$admirers[] = $admirer['id'];
}
$admirers[] = $friend_id;

unset($this->data['Friend']);
unset($this->data['Admirer']);

$this->data['Friend']['Friend'] = $friends;
$this->data['Admirer']['Admirer'] = $admirers;

if ($this->User->save($this->data)) {
$this->Session->setFlash('Added to Friends.');
}
}

Usage:
Simply put link /users/addfriend/10 and the user with id==10 will be
added to logged user friends and logged user will be added to user
with id==10.


Works perfect.


On 29 Wrz, 14:37, red <[EMAIL PROTECTED]> wrote:
> On 29 Wrz, 12:23, AD7six <[EMAIL PROTECTED]> wrote:
>
> > ... which is by design, otherwise how could you (easily) delete an
> > association. There are a few posts/threads/bakery articles/etc. around
> > with "working with habtm" in the title, after a quick google I am sure
> > you will find the info you are seeking ;).
>
> I've searched, but without success :(
>
> But I worked out this code:
>
> $this->data = $this->User->read(null, 
> $this->obAuth->getUserId());
>
> $friends = array();
> $i = 0;
> foreach ($this->data['Friend'] as $friend) {
> $friends[$i++] = $friend['id'];
> }
> $friends[$i] = $id;
>
> $this->data['Friend']['Friend'] = $friends;
>
> if ($this->User->save($this->data)) {
> $this->Session->setFlash('Added to Friends.');
> }
>
> So that looks to work ok. To make both side relation just need to run
> this code for every friend from $friends array.
> Tricky, but works for me right now.


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Why is "findAll()" not reading one field

2007-09-29 Thread Conrad

I was trying to read a field named 'check_num'.  I changed the field
name to 'draft'  (and throughout the logic) and it all works now.  Go
Figure!
Conrad

On Sep 29, 1:43 pm, Conrad <[EMAIL PROTECTED]> wrote:
> AD,
> Using EITHER Cake or normal PHP, the value in the 'check_num' field,
> although valid in the table, is not being read.
> The field is filled IN THE TABLE, but not in the associative array
> (either $this->data, or  $row = mysql_fetch_assoc() )
>
> This does not appear to be a "cake" problem, as normal PHP does the
> same thing.
>
> Conrad
>
> On Sep 29, 4:29 am, AD7six <[EMAIL PROTECTED]> wrote:
>
> > On Sep 29, 9:12 am, Conrad <[EMAIL PROTECTED]> wrote:
>
> > > I tried using the straight php code:
> > >   $resultID = mysql_query("SELECT * FROM dailypays");
> > >for ($x= 0; $x < mysql_num_rows($resultID); $x++)
> > >{
> > >  $row = mysql_fetch_assoc($resultID);
> > >  ...
> > > $this->set('row',$row);
> > > -
> > > this produced the same results.  This (other than the  $this->set() )
> > > did not use any cakePHP
>
> > > Any answers anybody?
>
> > Are you saying that the array key is missing in results (what I
> > originally understood), or that the value is different. If it's the
> > latter (what I now understand) I would check your table definitions
> > are correct as perceived by cake (pr($ModelInstance); and see where
> > this info goes missing (trace where the code goes for model->findAll,
> > find the db call and from there walk the code to find the
> > disappearance.)
>
> > hth,
>
> > AD


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Why is "findAll()" not reading one field

2007-09-29 Thread Conrad

AD,
Using EITHER Cake or normal PHP, the value in the 'check_num' field,
although valid in the table, is not being read.
The field is filled IN THE TABLE, but not in the associative array
(either $this->data, or  $row = mysql_fetch_assoc() )

This does not appear to be a "cake" problem, as normal PHP does the
same thing.

Conrad

On Sep 29, 4:29 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Sep 29, 9:12 am, Conrad <[EMAIL PROTECTED]> wrote:
>
> > I tried using the straight php code:
> >   $resultID = mysql_query("SELECT * FROM dailypays");
> >for ($x= 0; $x < mysql_num_rows($resultID); $x++)
> >{
> >  $row = mysql_fetch_assoc($resultID);
> >  ...
> > $this->set('row',$row);
> > -
> > this produced the same results.  This (other than the  $this->set() )
> > did not use any cakePHP
>
> > Any answers anybody?
>
> Are you saying that the array key is missing in results (what I
> originally understood), or that the value is different. If it's the
> latter (what I now understand) I would check your table definitions
> are correct as perceived by cake (pr($ModelInstance); and see where
> this info goes missing (trace where the code goes for model->findAll,
> find the db call and from there walk the code to find the
> disappearance.)
>
> hth,
>
> AD


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How do I removed header "CakePHP Rapid Development" in my page

2007-09-29 Thread ihti

edit default layout page (/app/views/layouts/default.ctp)

On Sep 29, 6:45 pm, firdzak <[EMAIL PROTECTED]> wrote:
> Hi
> I'm very new in php or cake
>
> I have try examples of cake in manual
> and its look cool
> but at the top of the page, it has a header "CakePHP Rapid
> Development" and at th bottom of the page it has an icon link to
> cakephp
> how do i remove this?


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Newbie, slow response, wrong tools ?

2007-09-29 Thread Phil

More stuff to learn then, at least it is encouraging to know moving
from msaccess is a good idea
Thanks for the help
phil


On 29 Sep, 07:21, AD7six <[EMAIL PROTECTED]> wrote:
> On Sep 28, 10:09 pm, Phil <[EMAIL PROTECTED]> wrote:
>
> > Newbie, slow response, wrong tools ?
>
> > I use ms access to run a small business and have decided to replace my
> > app with
> > linux, apache2, postgres 8., cakephp 1.2
>
> > so far i have got as far as adapting the bookmarks tutorial by graham
> > birdhttp://grahambird.co.uk/cake/tutorials/scaffolding.php
>
> > The problem is when I use it with 2500 records the response time is
> > circa 100 secs
>
> Hi,
>
> > am I ?
> > 1. displaying too big a data set
>
> Yes, but that won't account for 100seconds
>
> > 2. entirely in the wrong software with cakephp
>
> No, but there will be a number of things that you can do differently.
> Stopping using msaccess was one such fantastic decision already
> made :).
>
> > 3. should not be using scaffolding
>
> Scaffolding is there just for starting out, you would never use
> scaffolding on a real site.
>
> > 4. made some error with the table or coding
>
> If you use bake, you will get editable code instead of getting cake to
> generate a lot of logic on the fly all the time (see screencasts)
> If you run with debug set to 0 cake caches some setup info.
> If your tmp dir is not writable or missing, this is often a cause of
> slow response
> If you have any associations you could find you /think/ you are
> looking and retrieved a small amount of data whereas infact you
> retrieved a vast amount of data which you are not using.
>
> Once you have a simple application, if you then are still getting a
> slow response identify at least where the time goes (use the log
> function before and after a method you suspect, or use a profiling
> tool) - 100s is obviously extremely slow.
>
> hth,
>
> AD


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Newbie, slow response, wrong tools ?

2007-09-29 Thread Phil

Will do,
thanks for the suggestion

On 29 Sep, 04:37, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hi Phil,
>
> The problem isn't the amount of records, it's that you're trying to
> display too many results on a single page at the same time.  For this,
> there is pagination.
>
> Read this on how to integrate pagination into your 
> app:http://bakery.cakephp.org/articles/view/advanced-pagination-1-2
>
> Kevin,
>
> On Sep 28, 4:09 pm, Phil <[EMAIL PROTECTED]> wrote:
>
> > Newbie, slow response, wrong tools ?
>
> > I use ms access to run a small business and have decided to replace my
> > app with
> > linux, apache2, postgres 8., cakephp 1.2
>
> > so far i have got as far as adapting the bookmarks tutorial by graham
> > birdhttp://grahambird.co.uk/cake/tutorials/scaffolding.php
>
> > The problem is when I use it with 2500 records the response time is
> > circa 100 secs
>
> > am I ?
> > 1. displaying too big a data set
> > 2. entirely in the wrong software with cakephp
> > 3. should not be using scaffolding
> > 4. made some error with the table or coding
>
> > the only odd thing  I have done was to load the table without a
> > primary key
> > change ty_id to id and add created and modified
>
> > code and table below
>
> > tyre.php in models
> >  > class Tyre extends AppModel
> > {
> > var $name = 'Tyre';}
>
> > ?>
>
> > tyres_controller.php in controllers
> >  > class TyresController extends AppController
> > {
> > var $name = 'Tyres';
> > var $scaffold;}
>
> > ?>
>
> > -- add indexes later
> > DROP TABLE tyres ;
> > CREATE TABLE tyres (
> > --ty_ID SERIAL primary key, -- auto number field
> > ty_product_code varchar(30), -- UNIQUE NOT NULL,
> > ty_short_size   integer DEFAULT 111 NOT NULL,
> > ty_load integer NOT NULL, -- usually 2 digits
> > ty_speedvarchar(2)   NOT NULL ,
> > ty_desc varchar(35)  NOT NULL
> > );
> > Bulk load data
>
> > -- alter table
> > ALTER TABLE tyres ADD column ty_ID  SERIAL;
> > -- add primary key
> > ALTER TABLE tyres ADD PRIMARY KEY (ty_ID);
>
> > ALTER TABLE tyres RENAME COLUMN ty_ID to id;
> > ALTER TABLE ADD COLUMN created TIMESTAMP;
> > ALTER TABLE ADD COLUMN modified TIMESTAMP;


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How do I removed header "CakePHP Rapid Development" in my page

2007-09-29 Thread firdzak

tq for ur help. its cool

On Sep 30, 1:01 am, cakeFreak <[EMAIL PROTECTED]> wrote:
> In your website installation go to:
>
> cake\libs\view\templates\layouts
>
> copy the file dafault.ctp (cake 1.2 - or default.thtml cake 1.1) in
> your
>
> app\views\layouts
>
> Open it and edit it according to your need.
>
> Dan


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How do I removed header "CakePHP Rapid Development" in my page

2007-09-29 Thread cakeFreak

In your website installation go to:

cake\libs\view\templates\layouts

copy the file dafault.ctp (cake 1.2 - or default.thtml cake 1.1) in
your

app\views\layouts

Open it and edit it according to your need.

Dan


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How do I removed header "CakePHP Rapid Development" in my page

2007-09-29 Thread firdzak

Hi
I'm very new in php or cake

I have try examples of cake in manual
and its look cool
but at the top of the page, it has a header "CakePHP Rapid
Development" and at th bottom of the page it has an icon link to
cakephp
how do i remove this?


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using blank in Data Validation

2007-09-29 Thread Ahsan

Thanks FallernJehova.

I have already gone through the article, and this is what is has to
say about blank:

"blank validates that a field is blank or contains only whitespace
characters like tabs or spaces. It doesn't look very useful to me."

I know what it does, but what I wanted to know was any
situation/example where using it will be useful. One use that came to
my mind was checking that the id field is empty (if present) when
adding a new record. (Of course there are other ways to this):

var $validate = array(
   'id' => array(
  'rule' => 'blank',
  'on' => 'create'
   )
);

Any other situation, where using the blank may be useful?

Thanks


On 9/29/07, FallenJehova <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I think this article will help you:
>
> http://cakebaker.42dh.com/2007/01/03/validation-with-cakephp-12/
>
> Good luck!
>
> On 29 sep, 10:49, Ahsan <[EMAIL PROTECTED]> wrote:
> > Hi guys,
> >
> > I was going through all the built-in rules for data validation in 1.2.
> > I was just wondering whats the use of the blank rule? Since it is
> > there, I am sure it has a use, but I am not being able to figure it
> > out.
> >
> > Any ideas?
> >
> > Thanks.
> >
> > --
> > Regards
> > Ahsanul Bari
>
>
> >
>


-- 
Regards
Ahsan

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using blank in Data Validation

2007-09-29 Thread FallenJehova

Hi,

I think this article will help you:

http://cakebaker.42dh.com/2007/01/03/validation-with-cakephp-12/

Good luck!

On 29 sep, 10:49, Ahsan <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> I was going through all the built-in rules for data validation in 1.2.
> I was just wondering whats the use of the blank rule? Since it is
> there, I am sure it has a use, but I am not being able to figure it
> out.
>
> Any ideas?
>
> Thanks.
>
> --
> Regards
> Ahsanul Bari


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



no values in bake.php script

2007-09-29 Thread Jacob83

Hi out there,
i get a problem problem in cake.php... i dont get the name of the
fields in my database.
It the same in associations..
What goes wrong?
Regards,
Jacob
www.avr-projects.info

snippet:
Would you like to supply validation criteria for the fields in your
model? (y/n)
[y] >


Name:
Type: integer
---
Please select one of the following validation options:
---
1- VALID_NOT_EMPTY
2- VALID_EMAIL
3- VALID_NUMBER
4- VALID_YEAR
5- Do not do any validation on this field.

... or enter in a valid regex validation string.
---
here's what I get when I want to define a association:
What className will Lecture use?
[Lecture] >
A helpful List of possible keys
1.
2.
3.
4.

What is the foreignKey? Choose a number.
> 2


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



findAll() + custom field

2007-09-29 Thread unvs

Hi everyone!

First of all I'm new to Cake (which you'll probably see) - my question
is this:

$this->set('invoices', $this->Invoice->findAll());

does exactly what I want it to do, except that I also want to
incorporate a custom field into the query. That field would be

CONCAT(year,month,day,`index`) as invoiceid

Is it anyway to add this custom field to the findAll() query without
having to specify all the other fields I need (cause I need them all)?

Thanks in advance, and thanks for a great framework.


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



belongsTo association bug?

2007-09-29 Thread Toad

Hi i have an error in the cake produced SQL when defining belongsTo
association with conditions.
Here the technical details:
I have a table "Comments"

CREATE TABLE `comments` (
  `id` int(64) NOT NULL auto_increment,
  `parentobject_id` int(64) NOT NULL default '0',
  `parentobject_lookup` varchar(255) NOT NULL default '',
  `user_id` int(32) NOT NULL default '0',
  `title` varchar(255) default NULL,
  `body` mediumtext,
  PRIMARY KEY  (`id`)
) TYPE=MyISAM;

I have the following association in the Comment model class

var $belongsTo = array(
'Task' =>
array('className' => 'Task',
'foreignKey' => 'parentobject_id',
'conditions' => 'Comment.parentobject_lookup =
\'Tasks\'',
'fields' => '',
'order' => '',
'counterCache' => ''
),

'Project' =>
array('className' => 'Project',
'foreignKey' => 'parentobject_id',
'conditions' => 'Comment.parentobject_lookup =
\'Projects\'',
'fields' => '',
'order' => '',
'counterCache' => ''
),
);

I am trying to bind comment to different parents by using
  parentobject_id => the id of the parent
and
 parentobject_lookup=> the table that the id belongs to

when i call findAll(); in the controller i always get an empty array.
i traced the SQL produced by cake and found that it was:

SELECT `Comment`.`id`
 * * *
  FROM `comments` AS `Comment`
   LEFT JOIN `tasks` AS `Task` ON `Comment`.`parentobject_id` =
`Task`.`id`
   LEFT JOIN `projects` AS `Project` ON `Comment`.`parentobject_id` =
`Project`.`id`
WHERE  ( Comment.parentobject_lookup = 'Projects') AND
( Comment.parentobject_lookup = 'Tasks')

instead i think it should be

SELECT `Comment`.`id`
 * * *
  FROM `comments` AS `Comment`
   LEFT JOIN `tasks` AS `Task` ON `Comment`.`parentobject_id` =
`Task`.`id` AND Comment.parentobject_lookup = 'Tasks'
   LEFT JOIN `projects` AS `Project` ON `Comment`.`parentobject_id` =
`Project`.`id` AND Comment.parentobject_lookup = 'Projects'

I am not sure whether this is a bug or its my "twisted implementation"
of the conditions in the cake associations.
Any good ideas?


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: SimpleTesting

2007-09-29 Thread Changoso

Also, If I want to check if I delete a file, I check if the delete
link exists but dont really check the actuall deleting, is there a way
to check this?

thanks

On Sep 29, 8:23 am, Changoso <[EMAIL PROTECTED]> wrote:
> Hello, I did a system using cake that handles logins and mainly the
> basic things that you get by baking (add, delete, view, edit)
>
> I have to do som tests using simpletest php (http://simpletest.org/)
>
> To check if a member is logged i thought that by doing an if function
> such as:
>
> $this->browser->restart();
> $this->doLogin(USERS_ADMIN, USERS_ADMIN_PASSWORD);
> $this->browser->get(SERVER_URL.'/users/index');
>
> if($this->browser->getCurrentCookieValue('cookies-cakephp[user_id]')
> == true){
>
> $this->browser->get(SERVER_URL.'/users/index');
> $body = $this->browser->getContent();
> $this->assertTrue(preg_match('/Users/i', $body));
> $this->browser->clickImageById('Delete');
>
> }
>
> My idea was to first delete the cookies and then do a login as an
> admin.
>
> with  that if statement i wanted to check that if there is a cookie
> then we could assume the user is logged but aparently this is useless
> and should not be like that:
>
>  If the if statement is false, then there is no assert in the test,
> i.e., the test does not test anything. Either there should be no if
> statement or the if statement should be an assert. What's odd here is
> that the test appears to be able to succeed in an incorrect case (if
> there is a cookie value; there should not be a cookie value)
>
> so could I check if a user is truly loged? any idea? thankyou very
> much!


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Using blank in Data Validation

2007-09-29 Thread Ahsan

Hi guys,

I was going through all the built-in rules for data validation in 1.2.
I was just wondering whats the use of the blank rule? Since it is
there, I am sure it has a use, but I am not being able to figure it
out.

Any ideas?

Thanks.

-- 
Regards
Ahsanul Bari

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



SimpleTesting

2007-09-29 Thread Changoso

Hello, I did a system using cake that handles logins and mainly the
basic things that you get by baking (add, delete, view, edit)

I have to do som tests using simpletest php (http://simpletest.org/)

To check if a member is logged i thought that by doing an if function
such as:

$this->browser->restart();
$this->doLogin(USERS_ADMIN, USERS_ADMIN_PASSWORD);
$this->browser->get(SERVER_URL.'/users/index');

if($this->browser->getCurrentCookieValue('cookies-cakephp[user_id]')
== true){

$this->browser->get(SERVER_URL.'/users/index');
$body = $this->browser->getContent();
$this->assertTrue(preg_match('/Users/i', $body));
$this->browser->clickImageById('Delete');

}

My idea was to first delete the cookies and then do a login as an
admin.

with  that if statement i wanted to check that if there is a cookie
then we could assume the user is logged but aparently this is useless
and should not be like that:

 If the if statement is false, then there is no assert in the test,
i.e., the test does not test anything. Either there should be no if
statement or the if statement should be an assert. What's odd here is
that the test appears to be able to succeed in an incorrect case (if
there is a cookie value; there should not be a cookie value)

so could I check if a user is truly loged? any idea? thankyou very
much!


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Best way to handle "GUESTS" with ACL and groups

2007-09-29 Thread cakeFreak

Cheers Geoff!

With all answers you gave me I own you a couple of beers ;0)

By the way you therefore do

-ROOT
---Admins
-Editors
Users

And then you deny all actions (or just all, but read) to ROOT?

Dan


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to generate URL without ':' that has argument.

2007-09-29 Thread cakeFreak

Why in your users/something function you don't write

function something($id = null) {

if (!$id) {
$this->Session->setFlash("record not existent");
$this->redirect(array('action'=>'index'), null, true);
exit;
}

$user = $this->User->read(null, $id);

//se ho id e id esiste
if(!empty($user)){
//aumento hits di 1
$this->set('user', $user);
$this->set('title_for_layout', $post['User']['name'].' :: 
User');
}
else{
$this->Session->setFlash("user not existent");
$this->redirect(array('action'=>'index'), null, true);
exit;
}

}


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Another HABTM self referencing question - cannot save data?

2007-09-29 Thread red


On 29 Wrz, 12:23, AD7six <[EMAIL PROTECTED]> wrote:

> ... which is by design, otherwise how could you (easily) delete an
> association. There are a few posts/threads/bakery articles/etc. around
> with "working with habtm" in the title, after a quick google I am sure
> you will find the info you are seeking ;).

I've searched, but without success :(

But I worked out this code:

$this->data = $this->User->read(null, 
$this->obAuth->getUserId());

$friends = array();
$i = 0;
foreach ($this->data['Friend'] as $friend) {
$friends[$i++] = $friend['id'];
}
$friends[$i] = $id;

$this->data['Friend']['Friend'] = $friends;

if ($this->User->save($this->data)) {
$this->Session->setFlash('Added to Friends.');
}

So that looks to work ok. To make both side relation just need to run
this code for every friend from $friends array.
Tricky, but works for me right now.



--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How to generate URL without ':' that has argument.

2007-09-29 Thread TGG008

It'known that with router:
--
start---
Router::connectNamed(array('id'));
Router::connect('/something/*', array('controller' => 'users',
'action' => 'view'));
---
end--

I generate URL with:

---
start--
$myurl = Router::url(array('controller'=>'users', 'action'=>'view',
'id'=>100));

end-

I can get:
/something/id:100

but what i want is :  /something/100
i know i can use str_replace() to get it...but i want to know,can we
get the:/something/100
just from the Router::url()

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, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Question About Router,Friendly URL.

2007-09-29 Thread TGG008

Hi,everyone! I've been involed in this problem days...
in my routes.php I defined :
Router::connect('/google/:id/*', array('controller' => 'users',
'action' => 'view'));

when browse /google/123[any number]
it display the page of 'controller' => 'users', 'action' => 'index'
-
while using:
$a=Router::url(array('controller'=>'users', 'action'=>'view',
'id'=>100));
I can get:
/google/100

///
I know using:
Router::connectNamed(array('id'));
and Router:
Router::connect('/google/*', array('controller' => 'users', 'action'
=> 'view'));

this time :
using:
$a=Router::url(array('controller'=>'users', 'action'=>'view',
'id'=>100));
I can get:
/google/id:100
and when browse the url : /google/id:100
it's correct.
/
So. How Can I get url like/google/100
and display the right action ..

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, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Why is "findAll()" not reading one field

2007-09-29 Thread AD7six



On Sep 29, 9:12 am, Conrad <[EMAIL PROTECTED]> wrote:
> I tried using the straight php code:
>   $resultID = mysql_query("SELECT * FROM dailypays");
>for ($x= 0; $x < mysql_num_rows($resultID); $x++)
>{
>  $row = mysql_fetch_assoc($resultID);
>  ...
> $this->set('row',$row);
> -
> this produced the same results.  This (other than the  $this->set() )
> did not use any cakePHP
>
> Any answers anybody?

Are you saying that the array key is missing in results (what I
originally understood), or that the value is different. If it's the
latter (what I now understand) I would check your table definitions
are correct as perceived by cake (pr($ModelInstance); and see where
this info goes missing (trace where the code goes for model->findAll,
find the db call and from there walk the code to find the
disappearance.)

hth,

AD


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Another HABTM self referencing question - cannot save data?

2007-09-29 Thread AD7six



On Sep 29, 10:13 am, red <[EMAIL PROTECTED]> wrote:
> It's a bit closer, but now I get in debug:
>
> SELECT COUNT(id) AS count FROM `users` WHERE `id` = 5
> SELECT COUNT(id) AS count FROM `users` WHERE `id` = 5
> UPDATE `users` SET `id` = 5 WHERE `id` IN (5)
> DELETE FROM `users_users` WHERE user_id = '5'
> INSERT INTO `users_users` (user_id,friend_id) VALUES (5,14)
>
> And of course the DELETE command removes my earlier connections of id
> 5...

... which is by design, otherwise how could you (easily) delete an
association. There are a few posts/threads/bakery articles/etc. around
with "working with habtm" in the title, after a quick google I am sure
you will find the info you are seeking ;).

AD


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Theory again - mysql_query("INSERT INTO table...

2007-09-29 Thread AD7six



On Sep 29, 8:29 am, Conrad <[EMAIL PROTECTED]> wrote:
> In other words, if you don't pass a 'id', or pass 'id' = null, it will
> do an insert, otherwise if there is a non-null value for id it will
> update. ???

That isn't what I said. If it isn't clear try it.

One thing to note depending on your cake version, the first parameter
in the url may be taken to be the id of the primary model.

AD


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: create subdomain.

2007-09-29 Thread Isaac Raja
Hi,

   I have done it actually. i also use cake php to power it.

My domain is www.indiandrs.in


i'll tell you what i have done.

I spoke with my web hoster and told him to add a wildcard entry for my
domain  *.indiandrs.in

after that,  in before filter of u r application, u should extract the
subdomain name in to a variable.

$domain = env('HTTP_HOST');
$domain_parts = explode('.',$domain);
if (count($domain_parts) == 3 && $domain_parts[0]!= "www") { // make sure a
subdomain is called

$user = $domain_parts[0];

this method works only when your web hosting provider adds a wild card entry
in httpd.conf file


Thanks

Isaac

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Another HABTM self referencing question - cannot save data?

2007-09-29 Thread red

It's a bit closer, but now I get in debug:

SELECT COUNT(id) AS count FROM `users` WHERE `id` = 5
SELECT COUNT(id) AS count FROM `users` WHERE `id` = 5
UPDATE `users` SET `id` = 5 WHERE `id` IN (5)
DELETE FROM `users_users` WHERE user_id = '5'
INSERT INTO `users_users` (user_id,friend_id) VALUES (5,14)

And of course the DELETE command removes my earlier connections of id
5...

On 29 Wrz, 08:23, AD7six <[EMAIL PROTECTED]> wrote:
> On Sep 28, 11:36 pm, red <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello everybody!
> > I want to make something similliar to friend list, so I used self
> > referencing HABTM - users_users.
>
> > The tables are:
> > users (id, friend_id, bla bla bla) - pk (id, friend_id)  //
> > and id of course == friend_id
> > users_users (user_id, friend_id)- pk (user_id, friend_id)
>
> > The model relation is:
> > var $hasAndBelongsToMany = array(
> > 'Friend' =>
> > array('className' => 'User',
> > 'joinTable' => 'users_users',
> > 'foreignKey' => 'user_id',
> > 'associationForeignKey' => 
> > 'friend_id',
> > 'conditions' => '',
> > 'fields' => '',
> > 'order' => '',
> > 'limit' => '',
> > 'offset' => '',
> > 'unique' => true,
> > 'finderQuery' => '',
> > 'deleteQuery' => '',
> > 'insertQuery' => ''
> > ),
> > );
>
> > Now I need a controller method (action): function addfriend($friend_id
> > = null)
> > In body of this action is something like this:
>
> > $this->data['User']['id'] = $this->obAuth->getUserId();  //
> > retrive the id of logged users
> > $this->data['Friend'][0]['friend_id'] = $friend_id;//
> > add the id of friend
> > if ($this->User->save($this->data)) {
> > $this->Session->setFlash('Added to Friends.');
>
> > }
>
> > And it shows me the flash, but I don't see any new records in
> > users_users in DB :( Any ideas? Please help me!
>
> Have a look at what you would get in your data if you used a select
> box. You want $this->data['Friend']['Friend']['friend_id']
>
> hth,
>
> AD


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Why is "findAll()" not reading one field

2007-09-29 Thread Conrad

I tried using the straight php code:
  $resultID = mysql_query("SELECT * FROM dailypays");
   for ($x= 0; $x < mysql_num_rows($resultID); $x++)
   {
 $row = mysql_fetch_assoc($resultID);
 ...
$this->set('row',$row);
-
this produced the same results.  This (other than the  $this->set() )
did not use any cakePHP

Any answers anybody?

On Sep 29, 12:48 am, Conrad <[EMAIL PROTECTED]> wrote:
> Deleted tmp (cache/models - only files there) and swiched debug to 2.
> No difference noted.
> Conrad
>
> On Sep 29, 12:10 am, AD7six <[EMAIL PROTECTED]> wrote:
>
> > On Sep 29, 6:57 am, Conrad <[EMAIL PROTECTED]> wrote:
>
> > > I have a table that is filled by program.  This table contains field
> > > named "check_num" that contains data in the table, but is not being
> > > read out.
>
> > > $result = $this->Dailypay->findAll();
>
> > >  $this->set('row',$result);
>
> > > This returns the following: (only one record displayed)
> > > Array
> > > (
> > > [0] => Array
> > > (
> > > [Dailypay] => Array
> > > (
> > > [id] => 82
> > > [patient_id] => 10
> > > [lname] => Rodrigues
> > > [fname] => Moma
> > > [add1] => 1234  112th At
> > > [add2] =>
> > > [add3] =>
> > > [city] => Tacoma
> > > [state] => WA
> > > [zip] => 98387
> > > [phone] => 253-802-4512
> > > [provider_name] => Family Medical Clinic - Logan
> > > [provider_id] => 10
> > > [mrn] => 1853249
> > > [b_name] => Left Bank of the River
> > > [b_city] => Tacoma
> > > [b_state] => WA
> > > [routing] => 125108159
> > > [account] => 1234589
> > > [payment] => 75.00
> > > [fee] => 3.75
> > > [balance] => 0.00
> > > [check_num] =>  <
> > > Notice NOT in Array
> > > [last_pay_date] => -00-00
> > > [fee_type] => 0
> > > )
>
> > > Data from the table, dumped as a yaml (again only one record shown)
> > > 1:
> > >   id: 82
> > >   patient_id: 10
> > >   lname: Rodrigues
> > >   fname: Moma
> > >   add1: 1234  112th At
> > >   add2:
> > >   add3:
> > >   city: Tacoma
> > >   state: WA
> > >   zip: 98387
> > >   phone: 253-802-4512
> > >   provider_name: Family Medical Clinic - Logan
> > >   provider_id: 10
> > >   mrn: 1853249
> > >   b_name: Left Bank of the River
> > >   b_city: Tacoma
> > >   b_state: WA
> > >   routing: 125108159
> > >   account: 1234589
> > >   payment: 75.00
> > >   fee: 3.75
> > >   balance: 0.00
> > >   check_num: EZ10082 <== Notice, in Table
> > >   last_pay_date: 2007-09-28
> > >   fee_type: 0
>
> > > Note: There is data in check_num, but it is not being read by
> > > "$result = $this->Dailypay->findAll();"
>
> > > Anybody any ideas?
>
> > Delete your tmp files (not folders) or switch debug to >0 temporarily.
>
> > hth,
>
> >   AD


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Why is "findAll()" not reading one field

2007-09-29 Thread Conrad

Deleted tmp (cache/models - only files there) and swiched debug to 2.
No difference noted.
Conrad

On Sep 29, 12:10 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Sep 29, 6:57 am, Conrad <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have a table that is filled by program.  This table contains field
> > named "check_num" that contains data in the table, but is not being
> > read out.
>
> > $result = $this->Dailypay->findAll();
>
> >  $this->set('row',$result);
>
> > This returns the following: (only one record displayed)
> > Array
> > (
> > [0] => Array
> > (
> > [Dailypay] => Array
> > (
> > [id] => 82
> > [patient_id] => 10
> > [lname] => Rodrigues
> > [fname] => Moma
> > [add1] => 1234  112th At
> > [add2] =>
> > [add3] =>
> > [city] => Tacoma
> > [state] => WA
> > [zip] => 98387
> > [phone] => 253-802-4512
> > [provider_name] => Family Medical Clinic - Logan
> > [provider_id] => 10
> > [mrn] => 1853249
> > [b_name] => Left Bank of the River
> > [b_city] => Tacoma
> > [b_state] => WA
> > [routing] => 125108159
> > [account] => 1234589
> > [payment] => 75.00
> > [fee] => 3.75
> > [balance] => 0.00
> > [check_num] =>  <
> > Notice NOT in Array
> > [last_pay_date] => -00-00
> > [fee_type] => 0
> > )
>
> > Data from the table, dumped as a yaml (again only one record shown)
> > 1:
> >   id: 82
> >   patient_id: 10
> >   lname: Rodrigues
> >   fname: Moma
> >   add1: 1234  112th At
> >   add2:
> >   add3:
> >   city: Tacoma
> >   state: WA
> >   zip: 98387
> >   phone: 253-802-4512
> >   provider_name: Family Medical Clinic - Logan
> >   provider_id: 10
> >   mrn: 1853249
> >   b_name: Left Bank of the River
> >   b_city: Tacoma
> >   b_state: WA
> >   routing: 125108159
> >   account: 1234589
> >   payment: 75.00
> >   fee: 3.75
> >   balance: 0.00
> >   check_num: EZ10082 <== Notice, in Table
> >   last_pay_date: 2007-09-28
> >   fee_type: 0
>
> > Note: There is data in check_num, but it is not being read by
> > "$result = $this->Dailypay->findAll();"
>
> > Anybody any ideas?
>
> Delete your tmp files (not folders) or switch debug to >0 temporarily.
>
> hth,
>
> AD


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---