Re: What printing solution should I use?

2006-04-25 Thread [EMAIL PROTECTED]

Thanks for all replies. So kind of the people here.
I will try these mothod and post my final solution here.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Session value is favicon.ico Why?

2006-04-25 Thread Chris Cassell

I had the same problem. Make sure the link to favicon.ico is root- 
relative (/favicon.ico). Otherwise the server's looking for / 
controller/action/favicon.ico and the broken link gets captured as  
the current page. Same thing for your css and js.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Getting errors when session expires

2006-04-25 Thread jburns131

Sorry, I didn't make myself too clear in that last post. I still get
the 'The requested address %s was not found on this server.' error.

So my problem is: Why doesn't cake pull/access the controller/action
when I refresh the page after a session expires?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Simple HABTM Question

2006-04-25 Thread AD7six

Hi Brendon,

Try something like this:

// What do I need to put here to return all the
contractors linked to $service_id?
$result = $this-Contractors-Services-FindByID($service_id);
if ($result)
{
foreach ($result['Contractor'] as $Contractor)
{
$data[] = Array('Contractor'=$Contractor);
}
$this-set('data', $data);
}
else
{
$this-set('data', Array());
}

This gives me an opportunity to ask a question of my own: There is no
sort order applied at all to the sql for this kind of search - how can
the results be sorted.

Cheers,

AD7six


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Simple HABTM Question

2006-04-25 Thread brandags

I get a very strange result when I do that. I did have to singularize
the Model names as well:
$result = $this-Contractor-Service-findByID($service_id);

SQL Error in model Service: 1054: Unknown column 'Service.i_d' in
'where clause'

The query that's run is this:
SELECT `Service`.`id`, `Service`.`service_name`
FROM `services` AS `Service`
WHERE (`Service`.`i_d` = 2) LIMIT 1

Why is the 'id' split up like 'i_d'?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Simple HABTM Question

2006-04-25 Thread AD7six

ThereĀ“s a reason I wrote something like :). I use code very similar
to this, but I wrote it here off the top of my head.

Try:
$result = $this-Contractor-Service-findById($service_id);

Note the lowercase D, I don`t know if that's the reason for the
underscore, but it could be.

Cheers,

AD7six


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Simple HABTM Question

2006-04-25 Thread brandags

Ha! What do you know - that was it!  Thank you!


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Using $hasMany not working

2006-04-25 Thread [EMAIL PROTECTED]

I have an account model that should join to a terminology model.  Below
is the account model code:

class Account extends AppModel
{
var $name = 'Account';
var $useTable = 'G_ACCOUNT';
var $hasMany = array('Term' =
 array('className'   = 'Term',
   'conditions'  = '',
   'order'   = 'Term.value DESC',
   'limit'   = '',
   'foreignKey'  = 'account_id',
   'dependent'   = true,
   'exclusive'   = false,
   'finderSql'   = ''
 )
  );
}

The debug shows that the sql ran:
SELECT Term.ID, Term.ACCOUNT_ID, Term.KEY, Term.VALUE FROM
RH_INTAKE_CUSTOM_TERM Term WHERE Term.account_id=NULL ORDER BY
Term.value DESC

but the where clause is 'WHERE Term.account_id=NULL'.

Why is it NULL?  Shouldn't it be an id from the account table?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Ajax Problem

2006-04-25 Thread hydra12

Never mind.  My links to the .js files were wrong.  It works 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
-~--~~~~--~~--~--~---



Re: scaffolding with useDbConfig

2006-04-25 Thread Scott

I am having the same problem -- I've tried asking Victor directly, but
no response.  Does anyone have suggestions?

I have tried variations of the model/controller names, including
LinksCategory, Linksections, and now Seclinks (thought maybe the name
was too long).  I had been trying to get a $hasMany relationship set
up, but even when I strip that out I'm getting errors.  Here's the
current versions:

models/seclink.php:
?php

class Seclink extends AppModel {

var $name = 'Seclink';
}

?

controllers/seclinks_controller.php:
?php

class SeclinksController extends AppController {

var $name = 'SeclinksController';
var $scaffold;
}

?

table def in MySQL:

CREATE TABLE seclinks (
  id int(10) unsigned NOT NULL auto_increment,
  description varchar(50) NOT NULL default '',
  priority smallint(6) NOT NULL default '10',
  created datetime default NULL,
  modified datetime default NULL,
  PRIMARY KEY  (id)
) TYPE=MyISAM;

I have 5 other models exactly like this that are working just fine.
I'm obviously missing something.  Can anyone help???

Thanks!!!

-Scott


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: scaffolding with useDbConfig

2006-04-25 Thread Scott


Scott wrote:
 I am having the same problem -- I've tried asking Victor directly, but
 no response.  Does anyone have suggestions?


I found it... in my case this was a corrupted file.  I am not sure how,
but I compared file sizes on several of my models, and found an
unaccounted for 10 bytes in the seclinks model file. Diff did not show
them, and they were both of the same type.  Recreating the file from
scratch solved the problem.  I have no idea why.

-Scott


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Custom empty value for selectTag

2006-04-25 Thread saavedrajj

There's a way to asign a name and a value
for the empty value of a salecTag?

for example:

select name=data[User][user_level_id] 
  option value=0Select a Level/option // -- CUSTOM EMPTY
VALUE
  option value=1Administrator/option
  option value=2Editor/option
  option value=3Guest/option
  option value=4Regular/option
/select

I considered put this value on the related table, but isn't elegant.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



No scaffolding from fresh install !!

2006-04-25 Thread Dusty

Hi all,

I am testing out cakePHP and am having problems getting
scaffolding to work from a fresh install version
cake_0.10.9.2378_finalcake_0.10.9.2378_final.

I have the database and tables set up correctly and I have
the model and controllers set up correctly.  The only way
I can get scaffolding to work is turn off mod rewrite
and turn on pretty Urls in core.php.  Then I can get it to
work with the link http://cake1.localhost/index.php/users
but it does not save any of the files in the view to the
filesystem, they are only generated in the browser.  All the functions
work (CRUD) but nothing is saved to the web site.  IT will not work
from the
url http://cake1.localhost/users like it is supposed to either.
If I turn on mod rewrite and un comment pretty Urls then scaffolding
will not work at at all.  According to the examples I have seen this
should be easy but for some reason its not working for me.  I suspect
the problem has something to do with either mod rewrite or a path
misconfiguration.  Can anyone offer any advice.  Has anyone had the
same problem ??

--thanx
--dusty


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: No scaffolding from fresh install !!

2006-04-25 Thread Samuel DeVore

my guess is that the server doesn't have AllowOverride All set for
your directory
or are you on IIS?

On 4/25/06, Dusty [EMAIL PROTECTED] wrote:

 Hi all,

 I am testing out cakePHP and am having problems getting
 scaffolding to work from a fresh install version
 cake_0.10.9.2378_finalcake_0.10.9.2378_final.

 I have the database and tables set up correctly and I have
 the model and controllers set up correctly.  The only way
 I can get scaffolding to work is turn off mod rewrite
 and turn on pretty Urls in core.php.  Then I can get it to
 work with the link http://cake1.localhost/index.php/users
 but it does not save any of the files in the view to the
 filesystem, they are only generated in the browser.  All the functions
 work (CRUD) but nothing is saved to the web site.  IT will not work
 from the
 url http://cake1.localhost/users like it is supposed to either.
 If I turn on mod rewrite and un comment pretty Urls then scaffolding
 will not work at at all.  According to the examples I have seen this
 should be easy but for some reason its not working for me.  I suspect
 the problem has something to do with either mod rewrite or a path
 misconfiguration.  Can anyone offer any advice.  Has anyone had the
 same problem ??

 --thanx
 --dusty


 


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: No scaffolding from fresh install !!

2006-04-25 Thread Dusty

Samuel,

Yes I do have AllowOverride All in the
apache httpd..conf.  I know it is not file
permissions either because I opened the
right up on the devel server I am using.
I am not sure where else to start looking.
 
--thanx


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: No scaffolding from fresh install !!

2006-04-25 Thread Samuel DeVore

Have you tried changing the mod rewrite stuff to something really
simple like a redirect just to see if that part is getting called.  It
does seem that your issue is that the mod rewrite is not working, if
you have access the the server config maybe try turning up the
loggging for mod rewrite and see if you can get any insight
 Or get on the irc channel and ask some of the big brains there

Sam D
On 4/25/06, Dusty [EMAIL PROTECTED] wrote:

 Samuel,

 Yes I do have AllowOverride All in the
 apache httpd..conf.  I know it is not file
 permissions either because I opened the
 right up on the devel server I am using.
 I am not sure where else to start looking.

 --thanx


 


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



model_php4 issue - bug ? (maybe easyphp specific)

2006-04-25 Thread Olivier percebois-Garve




Hi all,

Got a bug on cakephp final. Maybe its easyphp specific. Would be cool
if you can tell if this is happening on xampp, and on LAMP.
It seems able only one round of query, at the second it dies. I
hacked a bit model_php4 and I think that during the second request,
the properties are all empty. Like $this-getID(); is not
functioning anymore.
To reproduce it:

 function index(){
  $whatever = $this-Model-read(null, 1);
  $data = "">
  $this-set('data', $data);
 }

result : Fatal error: ConnectionManager::getDataSource

 function index(){
  $data = "">
  $this-set('data', $data);
  $whatever = $this-Category-read(null, 1);
 }

result:  Fatal error: Call to a member function on a non-object




--~--~-~--~~~---~--~~
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  -~--~~~~--~~--~--~---