Re: Date validation not working

2007-02-20 Thread AD7six



On Feb 20, 7:33 am, regi [EMAIL PROTECTED] wrote:
 Hi,

 I am new to Cakephp. Ihave a problem with date validation.End date
 should always be greater than Start date. I have done the validation
 in my model ie;

 'end_date' = array(VALID_NOT_EMPTY,'rule' =array('comparison', '',
 'start_date') )

 But when I submit the form, I get the validation error,  even if I
 enter the end date which is greater than start date.

 also  a warning

 Warning: preg_match() expects parameter 1 to be string, array given
 in /home/localhost/public_html/myproject/cake/libs/model/
 model_php5.php on line 1348.

 Can anyone help me  to solve this problem.

Unless you have overwritten something in yoru model, validations are
purely regex based and what you have above isn't a regex. There are
articles on the bakery that are probably of interest to read.

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



Include Js file in layouts

2007-02-20 Thread [EMAIL PROTECTED]

I want to include javascript file in layout.It is possible? if it is,
how to include javascript file.

If i include like this

app/views/layouts/index.thtml

head
titleUntitled-1/title
meta http-equiv=Content-Type content=text/html;
charset=iso-8859-1
/head

script src='../js/shal.js' language='javascript'/script

it is not working.


--~--~-~--~~~---~--~~
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: Include Js file in layouts

2007-02-20 Thread AD7six



On Feb 20, 9:07 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 I want to include javascript file in layout.It is possible? if it is,
 how to include javascript file.

 If i include like this

 app/views/layouts/index.thtml

 head
 titleUntitled-1/title
 meta http-equiv=Content-Type content=text/html;
 charset=iso-8859-1
 /head

 script src='../js/shal.js' language='javascript'/script

 it is not working.

How could it ;). Your current location changes depending on if you
have parameters or not in the url, and you have specificed a relative
path - In any event it would be cleaner to use the javascript helper
to generate the script link (search the manual/group if you don't know
what that means)

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: CakePHP and LiveGrid (Rico)

2007-02-20 Thread archinform

*really* done easily in cake...
ok, it's pretty easy in relation to coding without a framework, but it
would be much more Rail style if the creation of js inclusion and
especially the datafeeds would be done automatically by scaffolding!

Other thing is that it's quite easy to get a working example of such
AJAX stuff, but the next step for making the code ready for production
use is much more difficult...

Sascha


--~--~-~--~~~---~--~~
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: Include Js file in layouts

2007-02-20 Thread Steniskis

You put your js files in a directory js inside the webroot directory

Then you have  helpers to add.

In the controller, you include
var $helpers = array('html', 'javascript');

and in your layout, you put this for example :

echo $html-charsetTag('UTF-8');

$head-js('prototype');
$head-js('scriptaculous.js?load=effects');
$head-js('controls');

$head-js('datepicker');
$head-js('zebra_tables');
$head-js('listes');
$head-js('script');
$head-js('jquery');
$head-js('thickbox');
$head-js('common');
if (ereg(MSIE, getenv(HTTP_USER_AGENT))){
$head-css('ie6_or_less');
}
$head-css('page');
$head-css('main');
$head-css('thickbox');
$head-css('datepicker');

Cheers
Steniskis


--~--~-~--~~~---~--~~
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: filesystem browser with cakephp

2007-02-20 Thread Fedya

perfect, thank you very much. that's just the answer i was looking
for.

i've new to mvc architecture, so i wasn't sure how i would go about
something like this, but this makes absolute sense

thanks,
fedya

On Feb 16, 6:25 am, Langdon Stevenson [EMAIL PROTECTED]
wrote:
 Hi Fedya

 I have written basic file handling features for a couple of projects
 now.  It's not difficult, and Cake doesn't really matter here.  It's
 just PHP.  Cake provides the vehicle for delivering the views.  You put
 all of your PHP file manipulating code in your controller.

 It is that simple.

 Regards,
 Langdon

  I'm not trying to make anything complicated. I won't need file
  permissions or anything, I will however want to authenticate to view
  the files.


--~--~-~--~~~---~--~~
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: Include Js file in layouts

2007-02-20 Thread Dr. Tarique Sani

On 2/20/07, Steniskis [EMAIL PROTECTED] wrote:

 You put your js files in a directory js inside the webroot directory

 Then you have  helpers to add.

 In the controller, you include
 var $helpers = array('html', 'javascript');

var $helpers = array('html', 'javascript','head','util');

you need to add the head helper and util for the calls to $head- to work...


 and in your layout, you put this for example

 $head-js('prototype');
 $head-js('scriptaculous.js?load=effects');
 $head-js('controls');

For some reason calls to $head- do not work in layout

I would suggest that investigate html and javascript helpers before
you venture with head helper.

http://manual.cakephp.org/chapter/helpers

HTH

Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
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: route and parameter

2007-02-20 Thread Sergei

I have to reply to myself:

$Route-connect('/topic/(\d+).html', array('controller' = 'posts',
'action' = 'view'));

That's it!

(\d+) is regexp meaning one or more any digit.



On 20 фев, 15:20, Sergei [EMAIL PROTECTED] wrote:
 Hello,

 I have Posts controller and View(id) action. Simple.

 How can I make a route url to access it:

 /topic/123.html

 where 123 is the ID parameter of View action?


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



Layout Problem

2007-02-20 Thread [EMAIL PROTECTED]

$helpers doesn't work for java script function in layouts files but it
work on views index files. Even simple alert functions are not
responding in layouts files. I need the script enabled in the layouts.
What could be the problem? What I want to know is how to include java
script file on layouts folder. Can u send me some sample coding so
that it may be easy for me to grasp.

views/index.thtml
the index.thtml file javascript is working fine.

But viiews/layout/index.thtmlinthis page javascript is not
working

but the home page this two files will be visible.

we are calling the layout/index.thtml file is

?php $this-setLayout('index'); ?

Please advice me

Thanks and Regards,


--~--~-~--~~~---~--~~
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: Layout Problem

2007-02-20 Thread Dr. Tarique Sani

On 2/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 $helpers doesn't work for java script function in layouts files but it
 work on views index files. Even simple alert functions are not

Please do not start new threads for the same problem - it make
answering and following difficult for everyone.

Apart from what I already wrote in the other thread (with a code
sample) you can do a couple of things.

#1 See if the generated html has any link to the js file - perhaps it
is there but wrong.
#2 Install firebug extension and see what the console error messages say.

HTH

Tarique


-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=

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

2007-02-20 Thread Eric C Blount
Very interesting. I'd like to know what happens with this - please keep me
informed.

Eric


On 2/19/07, Olwen Williams [EMAIL PROTECTED] wrote:


 While we are now getting OT the response from my hosting company was
 interesting:

 Mod gzip isn't installed. The last time (several years back) we had
 it installed it didn't actually reduce bandwidth usage for indivdual
 sites, the end user bandwidth graphs etc calculated usage on
 uncompressed data (gave inaccurate bandwidth reports), we did however
 see a drop off in total server bandwidth usage and large html files
 rendered quicker.

 We removed it back then due to high cpu usage and the odd report of
 pages not rendering properly, and I've not looked at it since. I'm
 interested to see how it performs now so what I'll do is install it on
 the server you are on for a testing period. If it goes well I'll leave
 it on (unless we see issues with it). This will happen within the next
 3 - 6 weeks.

 They have promised to let me know when it is installed so it will be
 interesting to see how it performs.

 On 20/02/07, Olwen Williams [EMAIL PROTECTED] wrote:
  Have already put the support ticket in.  Thanks very much
 
  On 20/02/07, Eric C Blount [EMAIL PROTECTED] wrote:
   Ask your host. They may be able to turn it on, or they may tell you
 how to
   do so.
  
   Eric
  
 

 


--~--~-~--~~~---~--~~
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: Include Js file in layouts

2007-02-20 Thread Steniskis

Don't forget the helper head.
Sorry
Steniskis



--~--~-~--~~~---~--~~
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: Include Js file in layouts

2007-02-20 Thread GreyCells

If you're using 1.2, then take a look here:

http://cake.insertdesignhere.com/posts/view/17

The HeadHelper functionality is implemented in the core.

~GreyCells

On Feb 20, 8:07 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 I want to include javascript file in layout.It is possible? if it is,
 how to include javascript file.

 If i include like this

 app/views/layouts/index.thtml

 head
 titleUntitled-1/title
 meta http-equiv=Content-Type content=text/html;
 charset=iso-8859-1
 /head

 script src='../js/shal.js' language='javascript'/script

 it is not working.


--~--~-~--~~~---~--~~
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: bake.php script writes models, but not controller or views

2007-02-20 Thread lukemack

to make that clearer - if your associations are wrong, the script will
crash.

On Feb 19, 1:33 pm, lukemack [EMAIL PROTECTED] wrote:
 i had the same problem when the model contained associations.
 commenting out the associations did the trick.

 On 25 Jan, 13:18, biesbjerg [EMAIL PROTECTED] wrote:

  Hi miggs,

  I recently had this problem. Turns out I had made a copy of a model
  (backed up app/models/media_folder.php as app/models/media_folder -
  Copy.php)

  I deleted this file and everything worked fine again.

  Guess app/models is only for models, eh? ;-)

  On Jan 17, 11:09 pm, miggs [EMAIL PROTECTED] wrote:

   I've used thebake.php script in the past with great results, but
   recently when I try to create acontroller, it goes through the script
   like normal, but never writes the files.  I've tried both building the
   conroller interactively as well asnot.  I was wondering if anyone had
   any experience with this happening?  It's probably something simple I'm
   missing, but I'm stumped.


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



Retreive HABTM data directly

2007-02-20 Thread Arjen


Hi everybody,

I'm trying to retrieve information from a HABTM directly. Users may
have a relation between each other, the have a self joined HABTM with
a table users_users.
$conditions = array(user_id2 = $me, user_id1=$id);
$contacts = $this-User-User1-findAll($conditions);
But the query above sees the Users1 not model as the HABTM relation
but as the regular User model. And the following query is run:

SELECT `User`.`id`, `User`.`group_id`, `User`.`country_id`,
`User`.`unique`, `Group`.`id`, `Group`.`name`, `Group`.`created`,
`Group`.`modified`, `Country`.`id`, `Country`.`name`,
`Country`.`shortcode` FROM `users` AS `User` LEFT JOIN `groups` AS
`Group` ON `User`.`group_id` = `Group`.`id` LEFT JOIN `countries` AS
`Country` ON `User`.`country_id` = `Country`.`id` WHERE (`user_id2` =
'17') AND (`user_id1` = '16')

$this-User-read(null, $id); Does retrieve the information correctly
though. But because retrieving the HABTM information with read takes
3 queries I can't set conditions.

Thanks,
Arjen


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



$helpers doesn't work for java script function in layouts files but it work on views index files.

2007-02-20 Thread jaideepj

$helpers doesn't work for java script function in layouts files but it
work on views index files. Even simple alert functions are not
responding in layouts files. I need the script enabled in the layouts.
What could be the problem? What I want to know is how to include java
script file on layouts folder. Can u send me some sample coding so
that it may be easy for me to grasp.


--~--~-~--~~~---~--~~
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: $helpers doesn't work for java script function in layouts files but it work on views index files.

2007-02-20 Thread AD7six



On Feb 20, 11:37 am, jaideepj [EMAIL PROTECTED] wrote:
 $helpers doesn't work for java script function in layouts files but it
 work on views index files. Even simple alert functions are not
 responding in layouts files. I need the script enabled in the layouts.
 What could be the problem? What I want to know is how to include java
 script file on layouts folder. Can u send me some sample coding so
 that it may be easy for me to grasp.

Come on ;). Usually duplicate questions warrant a reply of Please
search before posting. In this case however Please look at the group
home page before posting, this was discussed already *this morning*

http://groups.google.com/group/cake-php/topics

Throw me a bone here :)!

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: $helpers doesn't work for java script function in layouts files but it work on views index files.

2007-02-20 Thread Dr. Tarique Sani

On 2/20/07, jaideepj [EMAIL PROTECTED] wrote:

 $helpers doesn't work for java script function in layouts files but it
 work on views index files. Even simple alert functions are not
 responding in layouts files. I need the script enabled in the layouts.

Guys... I realize that this problem is probably very frustrating for
you but stop spamming the group with multiple mails and threads and
worse sending personal emails. This is not Microsoft Helpline ;)

Several suggestions have been made to you work on them and give us
more info to allow us to help you

Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
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: $helpers doesn't work for java script function in layouts files but it work on views index files.

2007-02-20 Thread Dr. Tarique Sani

On 2/20/07, AD7six [EMAIL PROTECTED] wrote:
 Throw me a bone here :)!

Woof!!

Andy I think the earlier query was from the same person/team - it
reads exactly the same

Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
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: Retreive HABTM data directly

2007-02-20 Thread AD7six



On Feb 20, 10:52 am, Arjen [EMAIL PROTECTED] wrote:
 Hi everybody,

 I'm trying to retrieve information from a HABTM directly. Users may
 have a relation between each other, the have a self joined HABTM with
 a table users_users.
 $conditions = array(user_id2 = $me, user_id1=$id);
 $contacts = $this-User-User1-findAll($conditions);
 But the query above sees the Users1 not model as the HABTM relation
 but as the regular User model. And the following query is run:

Please clarify what you want to achieve.

$this-User-findAll(x), will be the same as $this-User-User1-
findAll(x), will be the same as $this-User-User2-findAll(x) will
be the same as $this-AModelThatLinksTo-User-findAll(x).

Probably relavant:
http://groups.google.com/group/cake-php/search?group=cake-phpq=%22filtering+habtm%22qt_g=Search+this+group

Note that you can set conditions on an association defenition, so you
can influence the constraint used in the 3 queries.

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



Problem with cookie from 1.2 branch

2007-02-20 Thread Tom_mk

this is what i have inside my controller,
and i just don't know why mine doesn't working.

can any1 point me to the right direction?

Tom


CODE--

var $components = array('Cookie');

var $cookieName = 'myCookie';
var $cookieKey = 'has82js737hak2';
//  var $cookieDomain = '.message.localhost';

function __construct()
{
parent::__construct();
$this-cookieDomain = '.'.$_SERVER['SERVER_NAME'];
}

function index()
{
// get the Data from DB and put them inside variable $data
$this-set('data', $this-Message-findAll());

//  if($this-Cookie['name'])


//  $value=array(login,password);
//  $this-Cookie-write('login',$value,+5 day);

if($this-Cookie-read('name'))
{
$this-set('data2', $this-Cookie-read(name));
}
else
{
// no cookie has been setted
$this-set('data2', Guest);
$this-Cookie-write(name, Tom, TRUE, time()+3600);
}


}


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



embeded swf movie loads xml

2007-02-20 Thread Károly Kiripolszky

helo!

i noticed an annoying thing while working on a layout with embeded
flash menu. we use an external xml file to specify menu labels and
links, so when the client want's to change sg, we don't have to bother
with recompiling the swf. the site however is multilingual, so menu
files (which are reside in /webroot/xml/) are named like
menu_en_gb.xml. this way i have to pass the path to the xml file to
the movie.

the problem is with flash's path handling. the movie is loaded fine
everytime (using $html-url('/swf/menu.swf')) but the path to the xml
file needs to be changed according to the url's depth. there's not
much to say about the fla, as the path to the xml is passed as is like
XML.load(path) where path is from swfobject.

so, i don't know exactly why, but i need to modify the xml path to be
passed according to the current url by checking how many slashes it
contains. like when my app url is / the xml path will be ./xml/
menu_en_gb.xml but when the url to a page is like /controller/ the
path have to be changed to ../xml/menu_en_gb.xml or else flash cannot
find the xml, although the swf loads correctly.

this is the code for building the path to xml which is then passed to
the swf:

---
$extrapath = ./;
if (isset($this-params['url']['url']))
{
$url = $this-params['url']['url'];
$ct = 0;
for ($i=0; $istrlen($url); $i++)
if ($url[$i] == /) $ct++;
} else
$ct = 0;

if ($ct  0)
$extrapath = str_repeat('../', $ct);
---

and the chunk in the view:

---
script type=text/javascript
//  ![CDATA[
var so = new SWFObject(?php echo $html-url('/swf/menu.swf'); ?,
menu, 500, 50, 8, #7D6F62);
so.addVariable(live,true);
so.addVariable(path, ?php echo $extrapath.xml/menu_$lang.xml; ?
);
so.write(menu);
//  ]]
/script
---

how can i avoid having to bother with this workaround (besides leaving
flash)?


--~--~-~--~~~---~--~~
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: Saving hasMany relation in edit view

2007-02-20 Thread mindcharger

From the error:

I get following error when i try to save the view
Notice: Undefined index: Pnumber in /var/www/html/cake/app/controllers/
users_controller.php on line 22 

I'd say that the Pnumber is not getting to the controller...

Do you have your input boxes in a form? Maybe you're not getting
them from the correct source on the controller.

Try this:

Go to core.php file on app/config and set:

define('DEBUG', 3);

This will dump the objects on the view. From here you can see where
are your pnumbers going to and then you can tell the controller to
fetch them from the correct place.

Good luck!



On Feb 19, 12:39 pm, zafoeta [EMAIL PROTECTED] wrote:
 Hi all,

 I am quite  new in CakePHP.
 I actually read all the documentation about models, controllers and
 views in CakePHP.
 I have been doing some nice programming, but I get stuck on following
 problem.
 I have a view which assembles two tables which are realted to each
 other.
 Table users has many pnumbers, thus the class User defines a hasMany
 relation to Pnumber.
 I want to be able to view a user with all his related pnumbers. For
 this i do as follows in the users edit view:
 ?php $pnumbers = $this-data['Pnumber'];
 foreach ($pnumbers as $pnumber):
 echo $html-hidden('/Pnumber/id',array('value'=$pnumber['id']));
 echo $html-input('/Pnumber/pnumber', array('size' =
 '20', 'value' = $pnumber['pnumber']));
 endforeach;?

 This gives  me all the related pnumbers. User field are listed
 before ...
 Now, I think the hidden field and the input field parameters for
 pnumbers are not set correct in the edit.thml.
 Could you give me a hint on this?

 The users controller looks like this:
  if ($this-User-save($this-data['User']))
  if($this-Pnumber-save($this-data['Pnumber']))
  $this-flash('Your User has been saved.','/users');
   else
  $this-flash('Failed saving p-number.','/users');

 I get following error when i try to save the view
 Notice: Undefined index: Pnumber in /var/www/html/cake/app/controllers/
 users_controller.php on line 22
 Failed saving p-number.

 For completion; my User class looks as follows:
 class User extends AppModel {
 var $name = 'User';
 var $recursive = 2;
 var $belongsTo = array( 'Location' = array('className' =
 'Location'));
 var $hasMany = array('Pnumber' = array('className' = 'Pnumber',
   
   'conditions' = '',
   
   'order' = '',
   
   'dependent' = true,
   
   'foreignKey' = 'user_id'));
 var $validate = array(  'email' = VALID_EMAIL,
 
 'location_id' = VALID_NOT_EMPTY);

 }

 What am I doing wrong? What is the easiest way to do this?

 thanks a lot!
 Walter.


--~--~-~--~~~---~--~~
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: CakePHP and LiveGrid (Rico)

2007-02-20 Thread CraZyLeGs

On Feb 20, 7:45 am, archinform [EMAIL PROTECTED] wrote:
 *really* done easily in cake...
 ok, it's pretty easy in relation to coding without a framework, but it
 would be much more Rail style if the creation of js inclusion and
 especially the datafeeds would be done automatically by scaffolding!


Just modify the default layout, copy it from the core dir and put in
your app.
then do whatever you want in it ( include js or whatever )

 Other thing is that it's quite easy to get a working example of such
 AJAX stuff, but the next step for making the code ready for production
 use is much more difficult...

Scaffold is not meant for production, you should know that by now.


 Sascha


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

2007-02-20 Thread CraZyLeGs

this will happen within the next 3 - 6 weeks

Heh.

On Feb 20, 9:46 am, Eric C Blount [EMAIL PROTECTED] wrote:
 Very interesting. I'd like to know what happens with this - please keep me
 informed.

 Eric

 On 2/19/07, Olwen Williams [EMAIL PROTECTED] wrote:



  While we are now getting OT the response from my hosting company was
  interesting:

  Mod gzip isn't installed. The last time (several years back) we had
  it installed it didn't actually reduce bandwidth usage for indivdual
  sites, the end user bandwidth graphs etc calculated usage on
  uncompressed data (gave inaccurate bandwidth reports), we did however
  see a drop off in total server bandwidth usage and large html files
  rendered quicker.

  We removed it back then due to high cpu usage and the odd report of
  pages not rendering properly, and I've not looked at it since. I'm
  interested to see how it performs now so what I'll do is install it on
  the server you are on for a testing period. If it goes well I'll leave
  it on (unless we see issues with it). This will happen within the next
  3 - 6 weeks.

  They have promised to let me know when it is installed so it will be
  interesting to see how it performs.

  On 20/02/07, Olwen Williams [EMAIL PROTECTED] wrote:
   Have already put the support ticket in.  Thanks very much

   On 20/02/07, Eric C Blount [EMAIL PROTECTED] wrote:
Ask your host. They may be able to turn it on, or they may tell you
  how to
do so.

Eric


--~--~-~--~~~---~--~~
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: CakePHP and LiveGrid (Rico)

2007-02-20 Thread Olivier Percebois-Garve
Scaffold is not meant for production, but it has been suggested that it is
ok for production.

The manual is rather unclear on that point :

 So cool that you'll want to use it in production apps. Now, we think its
cool, too, but please realize that scaffolding is... well... just
scaffolding. It's a bunch of stuff you throw up real quick during the
beginning of a project in order to get started. It isn't meant to be
completely flexible. So, if you find yourself really wanting to customize
your logic and your views, its time to pull your scaffolding down in order
to write some code. 

Would be nice from the doc team should to clarify if scaffold is or not OK
for production...

Oli




On 2/20/07, CraZyLeGs [EMAIL PROTECTED] wrote:


 On Feb 20, 7:45 am, archinform [EMAIL PROTECTED] wrote:
  *really* done easily in cake...
  ok, it's pretty easy in relation to coding without a framework, but it
  would be much more Rail style if the creation of js inclusion and
  especially the datafeeds would be done automatically by scaffolding!
 

 Just modify the default layout, copy it from the core dir and put in
 your app.
 then do whatever you want in it ( include js or whatever )

  Other thing is that it's quite easy to get a working example of such
  AJAX stuff, but the next step for making the code ready for production
  use is much more difficult...

 Scaffold is not meant for production, you should know that by now.

 
  Sascha


 


--~--~-~--~~~---~--~~
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: CakePHP and LiveGrid (Rico)

2007-02-20 Thread AD7six



On Feb 20, 2:58 pm, Olivier Percebois-Garve [EMAIL PROTECTED]
wrote:
 Scaffold is not meant for production, but it has been suggested that it is
 ok for production.

 The manual is rather unclear on that point :

  So cool that you'll want to use it in production apps. Now, we think its
 cool, too, but please realize that scaffolding is... well... just
 scaffolding. It's a bunch of stuff you throw up real quick during the
 beginning of a project in order to get started. It isn't meant to be
 completely flexible. So, if you find yourself really wanting to customize
 your logic and your views, its time to pull your scaffolding down in order
 to write some code. 

Does that really need clarifying?

That isn't clear only if you don't understand scaffolding is...
well... just scaffolding = Scaffolding is nothing more than a
development tool.

Using scaffolding in production is a bit like having a house built and
telling the builders half way through It look's cool the way it is
with that industrial look you gave it.

Who/where is it suggested that scaffolding is ok for production btw?

Cheers,

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: Passing a value from view to controller

2007-02-20 Thread the_woodsman

You might want to store it somewhere else, i.e $html-
checkbox('OtherData/fakeField');

otherwise you may have have to modify the data array before passing it
into model-save(), etc.

On Feb 20, 7:34 am, apacheuk [EMAIL PROTECTED] wrote:
 Obvious really will give it a try later.

 Still getting to grips with cake at the moment, thanks for your help

 John David Anderson (_psychic_) wrote:





  On Feb 19, 2007, at 3:54 PM, apacheuk wrote:

  OK, I might be missing something here

  I have a form based on my model and this is working wonderfully I
  can save
  records and edit them.

  I'm having trouble in that I want to include a checkbox on the form
  that has
  no DB field or model, but I want to use the value of that checkbox
  to do
  some additional stuff in the controller when I submit the form.

  How do I include this checkbox if it doesn't have a an assciated
  field in
  the model and access from the controller?

  Just use the HtmlHelper methods as normal:

  ?php echo $html-checkbox('Model/fakeField'); ?

  And use it in the controller at:

  $this-data['Model']['fakeField'];

  Is that what you're after?

  -- John

 --
 View this message in 
 context:http://www.nabble.com/Passing-a-value-from-view-to-controller-tf32557...
 Sent from the CakePHP mailing list archive at Nabble.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
-~--~~~~--~~--~--~---



Re: Per-Controller Scaffolding

2007-02-20 Thread the_woodsman

Right, sorry, I managed to solve this by looking at scaffold.php.

It turns out that it includes views/controller_name/
scaffold.action.thtml

As opposed to, as the manual states,

/app/views/controller_name/scaffold/action.scaffold.thtml

Sorry to waste people's time... I don't really see why the
documentaiton isn't correct on this though :)


On 20 Feb, 16:22, the_woodsman [EMAIL PROTECTED] wrote:
 Hi bakers,

 Maybe I'm missing the obvious, but I can't override scaffolding for
 individual controllers.

 I've managed to get this working for the app as a whole 
 (seehttps://trac.cakephp.org/ticket/2113for why this took me a while!),
 but not for an individual controller.

 For example, I have a TimecardController.
 I have a views/timecard/scaffold dir.
 In here I have both scaffold.edit.thtml and edit.scaffold.thtml, and I
 can't get either of them to work.

 Any pointers?

 Thanks in advance,

 Woody


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



Per-Controller Scaffolding

2007-02-20 Thread the_woodsman

Hi bakers,

Maybe I'm missing the obvious, but I can't override scaffolding for
individual controllers.

I've managed to get this working for the app as a whole (see
https://trac.cakephp.org/ticket/2113 for why this took me a while!),
but not for an individual controller.

For example, I have a TimecardController.
I have a views/timecard/scaffold dir.
In here I have both scaffold.edit.thtml and edit.scaffold.thtml, and I
can't get either of them to work.

Any pointers?

Thanks in advance,

Woody


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



md5_file

2007-02-20 Thread [EMAIL PROTECTED]

Not really a cake question... but I was wondering... is md5 or crc a
good way to check if two files are identical?

I guess my question is, what are the chances that md5_file would
create the same hash for 2 different files? I assume this is highly
unlikely, but not really my area of expertise.

Thanks,
cook


--~--~-~--~~~---~--~~
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: Per-Controller Scaffolding

2007-02-20 Thread lloydhome

Documentation can be wrong just like code.  Issues can be Trac'ed
(trac.cakephp.org).  If it is wrong, submit a bug.  If you want to
help, submit a patch.

Thanks for your contributions,

David Lloyd
--
lloydhome consulting, inc
http://lloydhome.com

On Feb 20, 11:44 am, the_woodsman [EMAIL PROTECTED] wrote:
 Right, sorry, I managed to solve this by looking at scaffold.php.

 It turns out that it includes views/controller_name/
 scaffold.action.thtml

 As opposed to, as the manual states,

 /app/views/controller_name/scaffold/action.scaffold.thtml

 Sorry to waste people's time... I don't really see why the
 documentaiton isn't correct on this though :)

 On 20 Feb, 16:22, the_woodsman [EMAIL PROTECTED] wrote:

  Hi bakers,

  Maybe I'm missing the obvious, but I can't override scaffolding for
  individual controllers.

  I've managed to get this working for the app as a whole 
  (seehttps://trac.cakephp.org/ticket/2113forwhy this took me a while!),
  but not for an individual controller.

  For example, I have a TimecardController.
  I have a views/timecard/scaffold dir.
  In here I have both scaffold.edit.thtml and edit.scaffold.thtml, and I
  can't get either of them to work.

  Any pointers?

  Thanks in advance,

  Woody


--~--~-~--~~~---~--~~
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: Per-Controller Scaffolding

2007-02-20 Thread lloydhome

Documentation can be wrong just like code.  Issues can be Trac'ed
(trac.cakephp.org).  If it is wrong, submit a bug.  If you want to
help, submit a patch.

Thanks for your contributions,

David Lloyd
--
lloydhome consulting, inc
http://lloydhome.com


On Feb 20, 11:44 am, the_woodsman [EMAIL PROTECTED] wrote:
 Right, sorry, I managed to solve this by looking at scaffold.php.

 It turns out that it includes views/controller_name/
 scaffold.action.thtml

 As opposed to, as the manual states,

 /app/views/controller_name/scaffold/action.scaffold.thtml

 Sorry to waste people's time... I don't really see why the
 documentaiton isn't correct on this though :)

 On 20 Feb, 16:22, the_woodsman [EMAIL PROTECTED] wrote:

  Hi bakers,

  Maybe I'm missing the obvious, but I can't override scaffolding for
  individual controllers.

  I've managed to get this working for the app as a whole 
  (seehttps://trac.cakephp.org/ticket/2113forwhy this took me a while!),
  but not for an individual controller.

  For example, I have a TimecardController.
  I have a views/timecard/scaffold dir.
  In here I have both scaffold.edit.thtml and edit.scaffold.thtml, and I
  can't get either of them to work.

  Any pointers?

  Thanks in advance,

  Woody


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



Old release downloads and subversion history...

2007-02-20 Thread TheIdeaMan

I have some CakePHP apps that were build on earlier versions of Cake
(1.0.1.2708) and I'm wanting to migrate them up to the latest 1.2.
Doing this has proved to be a headache thus far. Each release (even
minor) changed enough things (syntax, api) to make moving from 1.0 to
1.1 to 1.2 rather hard.

Along those lines, I had hoped to find old copies of earlier releases
and work my way up through them following what changed in the release
notes for each, so I could avoid trying to tackle the entire history
of changes in one upgrade.

The CakePHP site, however, only has the most recent files and the
subversion repo only has a few releases tagged.

Is there a way I can get these old releases from the repo? or as a tar
file? I think it would be helpful to keep these downloads around for
these and other situations that may arise. It also makes the project
look better: http://www.ohloh.net/projects/3176

Thanks,
TheIdeaMan

--~--~-~--~~~---~--~~
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: habtm does not work with find when I specify fields

2007-02-20 Thread codecowboy

Thank you.  Can you elaborate a little on that last paragraph?  Are
you talking about adding code to the CollegeDepartment model?


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

2007-02-20 Thread lloydhome

hashes are just a number so a collision is certain with a large enough
dataset.  CRC is usually 32 - 64 bits and MD5 is 128 bit.  They are
pretty good at making sure you have the file you knew you wanted -
i.e. checking for transmission errors.  To check against a duplicate
file I would want something better.  At least the MD5 , filelength ,
and first n bytes of the file (32+?).  If all three were the same it
would be a real good check but not definitive.  The more you can check
against the better until you actually compare byte-to-byte the two
files.

My 2c,

David Lloyd
--
lloydhome consulting, inc.
http://lloydhome.com

On Feb 20, 11:44 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Not really a cake question... but I was wondering... is md5 or crc a
 good way to check if two files are identical?

 I guess my question is, what are the chances that md5_file would
 create the same hash for 2 different files? I assume this is highly
 unlikely, but not really my area of expertise.

 Thanks,
 cook


--~--~-~--~~~---~--~~
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: Problem with htmlhelper table generators

2007-02-20 Thread thequietlab

That was it ! :)
thanks Eric

On Feb 20, 12:27 am, Eric C Blount [EMAIL PROTECTED] wrote:
 Try this:

 table
 ?php
 echo $html-tableHeaders(array('col1','col2'));
 echo $html-tableCells(array('row1a','row1b'));
 echo $html-tableCells(array('row2a','row2b'));
 ?
 /table

 HTH,
 Eric

 On 2/19/07, thequietlab [EMAIL PROTECTED] wrote:



  Hi!

  my piece of code looks like this :

  ?php
  echo $html-tableHeaders(array('col1','col2'));
  echo $html-tableCells(array('row1a','row1b'));
  echo $html-tableCells(array('row2a','row2b'));
  ?

  instead of a table I get my values returned as a string (no html
  formatting) like this :
  'col1 col2 row1a row1b row2a row2b'

  I'm not sure what's wrong .. can anybody help ?

  i.e. $html-link('title','/some_page'); works fine generating link as
  it should


--~--~-~--~~~---~--~~
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: embeded swf movie loads xml

2007-02-20 Thread [EMAIL PROTECTED]

What about using an absolute path to the XML?
Flash 8  9 allows use of a full URL with XML.Load as long as they
don't cross-domains or cross-protocols.

If you have to use relative paths, you could try adding a basepath
(base href=) to the layout.
I don't know if a Flash object respects the basepath of the document
that contains it, but if it does that would work.

Rhett


--~--~-~--~~~---~--~~
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: Location of custom php.ini

2007-02-20 Thread Duncan

Smashing, many thanks!

Duncan

On Feb 20, 3:16 am, basic612 [EMAIL PROTECTED] wrote:
 Hi, when running php as CGI in Apache suEXEC environment, the php.ini
 needs to be located in the directory housing the script that being
 exectuted - ie:

 if your application is running (as per default settings) from:

 ./app/webroot/index.php

 then the location would be

 ./app/webroot/php.ini

 any scripts that are included as a part of running the original script
 will be executed with whatever settings you have in this php.ini file.
 You do not need additional php.ini files in any directories containing
 other included or required scripts.

 Note that your webhost might have disabled the ability to override
 certain configuration values for php - including (although I doubt
 they would) the upload_max_filesize value.

 To check if your setting are taking effect, just add a phpinfo() line
 at the top of your ./app/webroot/index.php script - you will be able
 to see the difference between the default server php configuration
 values and those as set by your custom php.ini file.

 HTH,

 Dan.

 On Feb 20, 8:32 am, Duncan [EMAIL PROTECTED] wrote:

  Hello,

  I've the common PHP problem of my upload_max_filesize = 2M being too
  small for my needs.  Due to my host's restrictions I can't set value
  this through the .htaccess file.  (Nor does ini_set appear to work
  when placed in, say, app/config/core.php)

  As I'm using PHP4, I can't just place a custom php.ini in my http root
  - I have to place it in the directory where the upload script is run.
  So, in order for PHP to accept files larger than the default 2M, where
  should I place my php.ini within the cake directory tree?

  Cheers,

  Duncan


--~--~-~--~~~---~--~~
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: Passing a value from view to controller

2007-02-20 Thread Vu Nguyen

Not really, cake knows your database strcture, so even if the data
array contains other fields it doesn't really matter.

On Feb 20, 8:48 am, the_woodsman [EMAIL PROTECTED] wrote:
 You might want to store it somewhere else, i.e $html-

 checkbox('OtherData/fakeField');

 otherwise you may have have to modify the data array before passing it
 into model-save(), etc.

 On Feb 20, 7:34 am, apacheuk [EMAIL PROTECTED] wrote:

  Obvious really will give it a try later.

  Still getting to grips with cake at the moment, thanks for your help

  John David Anderson (_psychic_) wrote:

   On Feb 19, 2007, at 3:54 PM, apacheuk wrote:

   OK, I might be missing something here

   I have a form based on my model and this is working wonderfully I
   can save
   records and edit them.

   I'm having trouble in that I want to include a checkbox on the form
   that has
   no DB field or model, but I want to use the value of that checkbox
   to do
   some additional stuff in the controller when I submit the form.

   How do I include this checkbox if it doesn't have a an assciated
   field in
   the model and access from the controller?

   Just use the HtmlHelper methods as normal:

   ?php echo $html-checkbox('Model/fakeField'); ?

   And use it in the controller at:

   $this-data['Model']['fakeField'];

   Is that what you're after?

   -- John

  --
  View this message in 
  context:http://www.nabble.com/Passing-a-value-from-view-to-controller-tf32557...
  Sent from the CakePHP mailing list archive at Nabble.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
-~--~~~~--~~--~--~---



Associations cross databases

2007-02-20 Thread safl

Hey Bakers!

Is it possible to utilize cakePHP for setups with cross database
joins?

F.ex. 3 Databases: crm, monitoring, helpdesk.

I then want to find a specific Customer (stored in crm) join with
all associated Host (stored in monitoring), and lastly join
Ticket (stored in helpdesk).

In plain vanilla it would be something like:

SELECT h.*, c.*, t.*
FROM monitoring.hosts AS h, crm.customers AS c, helpdesk.tickets
WHERE
c.id = 'some_int' AND
h.cust_id = c.id AND
t.cust_id = c.id

I've tried using useDbConfig and playing around with my database
configuration (persistent connection) But i get errors like SQL Error
in model xxx:.
I then tried specifying a table prefix (thinking appending the
database would be a fix) but then i just got errors like No Database
table for model XXX (expected myPrefix.xxx), create it first..

I found in the manual that it's possible to perform custom SQL in the
model (like the plain vanilla sql above), but since my entire app is
split into subsystems on DB level then i would not really gain much
advance in using cakePHP since i wouldn't get all those nifty features
that i am longing :)

And the short version is:
Please help me!
Is it possible to utilize cakePHP for setups with cross database
joins?

Thanks,
Simon


--~--~-~--~~~---~--~~
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: Associations cross databases

2007-02-20 Thread Grant Cox

It should just work - just make sure you have the appropriate
connections in your app/config/database.php, and that each model has
the appropriate $useDbConfig set.

The only thing that can mess it up, is a bug, apparently in MySQL,
where connections to multiple databases need to have different
usernames and passwords. So, in your app/config/database.php, each
connection needs to connect with a different username/password.

I found out about this from someone on the IRC channel (probably
PhpNut) some months ago, but I didn't keep a note of any urls for more
information...


--~--~-~--~~~---~--~~
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: Old release downloads and subversion history...

2007-02-20 Thread Grant Cox

You can check out every revision through Subversion, via
https://svn.cakephp.org/repo/trunk/cake/1.1.x.x/

You should find minimal changes migrating to 1.1.13 (the latest 1.1.x
code).  Look through the old release announcements from PhpNut - he
will mention in those anything that changed that would break previous
code (like lazy model loading).  But up to 1.1.13, there won't be
many.

To 1.2, you will find many more things, as this is a major release.
Plus, it is a major release that is not yet final, so there is not a
lot of documentation around.  Depending on how urgent your migration
is, perhaps you could wait until a final version is available.



TheIdeaMan wrote:
 I have some CakePHP apps that were build on earlier versions of Cake
 (1.0.1.2708) and I'm wanting to migrate them up to the latest 1.2.
 Doing this has proved to be a headache thus far. Each release (even
 minor) changed enough things (syntax, api) to make moving from 1.0 to
 1.1 to 1.2 rather hard.

 Along those lines, I had hoped to find old copies of earlier releases
 and work my way up through them following what changed in the release
 notes for each, so I could avoid trying to tackle the entire history
 of changes in one upgrade.

 The CakePHP site, however, only has the most recent files and the
 subversion repo only has a few releases tagged.

 Is there a way I can get these old releases from the repo? or as a tar
 file? I think it would be helpful to keep these downloads around for
 these and other situations that may arise. It also makes the project
 look better: http://www.ohloh.net/projects/3176

 Thanks,
 TheIdeaMan


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



Need help passing data from an associated model in a view to controller then to an edit view

2007-02-20 Thread [EMAIL PROTECTED]

Here's the db situation: members model has a foreign key(pictureid) to
the pictures model(id).

I can successfully associate two models with each other, therefore I
am able to display the data from the associated model in my index
view:

?php echo $member['Picture']['0']['picaddr'];?

Now I want to be able to send the data from the associated model (that
appears in my index view) to the edit view.  In my edit view, I am
able to display the parent model data by :

?php echo $html-input('Member/fname', array('size' = '40'))?

but when I try to use this:

?php echo $html-input('Picture/picaddr', array('size' = '40'))?

nothing appears in the text field in my edit view.

Any idea what I am doing wrong? 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: Associations cross databases

2007-02-20 Thread Mariano Iglesias

Set the $new_link parameter to true to force a new link even if user 
password is the same:

http://ar.php.net/mysql_connect

resource mysql_connect ( [string $server [, string $username [, string
$password [, bool $new_link [, int $client_flags] );

Though that should be necessary when calling mysql_connect with the same
parameters.

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Grant Cox
Enviado el: Martes, 20 de Febrero de 2007 08:54 p.m.
Para: Cake PHP
Asunto: Re: Associations cross databases

The only thing that can mess it up, is a bug, apparently in MySQL,
where connections to multiple databases need to have different
usernames and passwords. So, in your app/config/database.php, each
connection needs to connect with a different username/password.

I found out about this from someone on the IRC channel (probably
PhpNut) some months ago, but I didn't keep a note of any urls for more
information...


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



CakePHP 1.2 issue

2007-02-20 Thread Maxus

Hi People,

After Following the article on: http://cake.insertdesignhere.com/posts/view/16
I tried to use the paging i also switched off the AJAX part in the
tutorial. Im not sing ModRewrite which i think is the reason its
breaking:

when i use paging the code that generates the next previous buttons
fail to include the controller / action in the generated URL when not
using modrewrite:

? $paginator-options(array()); ?

?=$paginator-prev(' Previous', null, null, array('class' =
'disabled')); ? |
?=$paginator-next('Next ', null, null, array('class' =
'disabled')); ? |
Sort by
?=$paginator-sort('created'); ? |
?=$paginator-sort('updated'); ? |
Page ?=$paginator-counter(); ?

? pr($data); ?

this code generates this:

div 0= class=disabled Previous/div |
a href=/linked2/index.php/page:2 Next /a |
Sort by
a href=/linked2/index.php/sort:created/page:1/order:/direction:asc
Created/a |
a href=/linked2/index.php/sort:updated/page:1/order:/direction:asc
Updated/a |
Page 1 of 4


So i though well i will just include the URL in the options like so:

? $paginator-options(array()); ?

?=$paginator-prev(' Previous', array('url' = 'links/
displaylinks/'), null, array('class' = 'disabled')); ? |
?=$paginator-next('Next ', array('url' = 'links/displaylinks/'),
null, array('class' = 'disabled')); ? |
Sort by
?=$paginator-sort('created', null, array('url' = 'links/
displaylinks/')); ? |
?=$paginator-sort('updated', null, array('url' = 'links/
displaylinks/')); ? |
Page ?=$paginator-counter(); ?

this ends up generating this:

div class=disabled Previous/div |
br /
bNotice/b:  Undefined offset:  0 in b/var/www/linked2/cake/libs/
router.php/b on line b632/bbr /
br /
bNotice/b:  Undefined offset:  0 in b/var/www/linked2/cake/libs/
router.php/b on line b632/bbr /
br /
bNotice/b:  Undefined index:   in b/var/www/linked2/cake/libs/
router.php/b on line b632/bbr /
a href=/linked2/index.php/links/displaylinks/: Next /a |
Sort by
br /
bNotice/b:  Undefined offset:  0 in b/var/www/linked2/cake/libs/
router.php/b on line b632/bbr /
br /
bNotice/b:  Undefined offset:  0 in b/var/www/linked2/cake/libs/
router.php/b on line b632/bbr /
br /
bNotice/b:  Undefined index:   in b/var/www/linked2/cake/libs/
router.php/b on line b632/bbr /
a href=/linked2/index.php/links/displaylinks/:/sort:created/page:1/
order: Created/a |
br /
bNotice/b:  Undefined offset:  0 in b/var/www/linked2/cake/libs/
router.php/b on line b632/bbr /
br /
bNotice/b:  Undefined offset:  0 in b/var/www/linked2/cake/libs/
router.php/b on line b632/bbr /
br /
bNotice/b:  Undefined index:   in b/var/www/linked2/cake/libs/
router.php/b on line b632/bbr /
a href=/linked2/index.php/links/displaylinks/:/sort:updated/page:1/
order: Updated/a |
Page 1 of 4

Im using the lastest nightly SVN build (1.2.x.x_19.02.2007)

Any ideas how to fix this?

Thanks!
Maxus


--~--~-~--~~~---~--~~
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 models in elements

2007-02-20 Thread the_woodsman

I'm confused about this issue.
I had assumed having Models referenced directly in presentation
related code was bad practice - but isn't that the Cake 1.2 way of
doing form inputs? It seems to make for cleaner and simpler code that
way...

tompouce, is there a chance your new problems are caused by the lazy
loading feature, introduced not too long ago?

The post  Component can't create a model discusses similar
issues,and mentions the loadModel function...

http://groups.google.com/group/cake-php/browse_thread/thread/71d9021c27f32419/8a6d98c57a59609f?lnk=gstq=create+modelrnum=3hl=en#8a6d98c57a59609f








On Feb 20, 2:45 pm, tompouce [EMAIL PROTECTED] wrote:
 Yeah but, I want just to include an element that will get my blocks for my
 sidebar from the database Blocks without any thing more than a model, like i
 used to do...

 is there a good simple way to this?

 Thanks!



 AD7six wrote:

  On Feb 20, 5:29 am, tompouce [EMAIL PROTECTED] wrote:
  Hi!

  A year ago I coded an app with cakephp, and in my elements
  I was using this syntax:

  $bleh = new Modelname;

  for using stuff from the dabatase Modelnames.

  But now its not working anymore because I must be missing something, any
  ideas?

  Like if i want to include a sidebar to a website.

  I include the element Sidebar who get the Bloc from the database Blocs.

  like $Sidebar = new Blocs;

  foreach ($Blocs as $Bloc): etc...

  Thanks!
  --
  View this message in
  context:http://www.nabble.com/using-models-in-elements-tf3256640.html#a9054292
  Sent from the CakePHP mailing list archive at Nabble.com.

  Hi Tom,

  There is a way to instanciate a model wherever you need it, but you
  should /never/ do that in a view/layout/element. My suggestion would
  be to add var $uses = array('Bloc') to your app controller and put the
  logic you want in the beforeRender method (but be aware that for a
  cake error message an instance of the app controller is used and no
  models are loaded). There are other ways, but explaining them might
  encourage you to leave the model stuff in the element, which I don't
  want to do :)

  HTH,

  AD

 --
 View this message in 
 context:http://www.nabble.com/using-models-in-elements-tf3256640.html#a9063042
 Sent from the CakePHP mailing list archive at Nabble.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
-~--~~~~--~~--~--~---



Re: View Caching of Home Page

2007-02-20 Thread lloydhome

The problem is that the file is created by the value of $this-here
and if that is the same as cacheAction or in the array of
cacheAction.  Then when hitting the site the same url has to be used.
The easiest solution off the top of my head is to use mod_rewrite to
force ^$  and ^/$  to go to your custom controller/action

RewriteRule ^$   index.php?url=/mycontroller/myaction [QSA,L]
RewriteRule ^/$  index.php?url=/mycontroller/myaction [QSA,L]

# everything else below


I have not tried it but hope it helps,

David Lloyd
--
lloydhome consulting
http://lloydhome.com


On Feb 20, 6:51 pm, PaulV [EMAIL PROTECTED] wrote:
 Hi Guys,

 I am trying to improve the performance of loading my home page by
 turning on view caching in Cake Stable: 1.1.13.4450

 My home page (e.g. at http://myurl/) is routed to a custom
 controller using the following in routes.php

 $Route-connect('/', array('controller' = 'pub', 'action' =
 'index', ''));

 where I have a custom controller pub_controller.php with a custom
 action index and the appropriate CACHE_CHECK global and cacheAction
 variables have been set.

 When I visit the home page, no file gets created in the tmp/cache/
 views directory. If I visit other URLs, a cache file is created (eg. I
 visit pub/index as above).

 Can someone let me know how I can solve this problem?

 Thanks,
Paul


--~--~-~--~~~---~--~~
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: CakePHP 1.2 issue

2007-02-20 Thread Mariano Iglesias

See my answer on this thread to see how to properly specify the URL:

http://groups.google.com/group/cake-php/browse_thread/thread/f990a4596793566
5

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Maxus
Enviado el: Martes, 20 de Febrero de 2007 09:58 p.m.
Para: Cake PHP
Asunto: CakePHP 1.2 issue

So i though well i will just include the URL in the options like so:

this ends up generating this:

bNotice/b:  Undefined offset:  0 in b/var/www/linked2/cake/libs/
router.php/b on line b632/bbr /


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



invalidate help

2007-02-20 Thread josesquared

I am using the invalidate function in the controller and it is not
triggering the tagErrorMsg.  I also tested and it doesn't seem to
block the save either.  The validation works fine when I construct the
validation array in the Model but I just want to know if I'm able to
do it through the controller.  All the documentation I've read seem to
say it's possible but I haven't found any luck

Here's my code:

In the controller:
   $this-User-invalidate('email');

In the view:
   ?php echo $html-input('User/email', array('size' = '35',
'class'='formbox'))?
   ?php echo $html-tagErrorMsg('User/email', 'Email Address is
required.') ?

Any help would be appreciated.


--~--~-~--~~~---~--~~
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: Need help passing data from an associated model in a view to controller then to an edit view

2007-02-20 Thread Grant Cox

The Html helper functions pull their prepopulated values from $this-
data, which you will be setting in the controller.  So, the two
options are to provide an explicit value, or to get the $this-data
set up how you want.

Option 1, simple :)
Rather than rely on the Html helper to automatically prepopulate from
the $this-data, you can supply the input field's value.
$html-input('Picture/picaddr', array('value'=$member['Picture']['0']
['picaddr']))

Option 2, more complex.
The Html helper functions prepopulate from the $this-data of your
controller action. So, if you have
$html-input('Picture/picaddr')
in a view, it will load its value from, and save the value to, $this-
data['Picture']['picaddr'] in your controller.

To get the data in the field, just make sure this data attribute is
set correctly in your controller.  The main reason that it won't be
working right now, is that your Member hasMany Pictures, so when you
have

$this-data = $this-Member-read(null,$id)

as is probably in your edit action, then the format of $this-data is
more like
$this-data = array(
  'Member' = array( ... member details ... ),
  'Picture' = array(
 [0] = array( ..picture details... ),
 [1] = array( ..picture details... )
  )
)

If instead you have

$this-data = $this-Picture-read(null,$id)
$this-data['Picture'] = $this-data['Picture'][0]

and your form element $html-input('Picture/picaddr')  should
prepopulate with the first picture's address.



[EMAIL PROTECTED] wrote:
 Here's the db situation: members model has a foreign key(pictureid) to
 the pictures model(id).

 I can successfully associate two models with each other, therefore I
 am able to display the data from the associated model in my index
 view:

 ?php echo $member['Picture']['0']['picaddr'];?

 Now I want to be able to send the data from the associated model (that
 appears in my index view) to the edit view.  In my edit view, I am
 able to display the parent model data by :

 ?php echo $html-input('Member/fname', array('size' = '40'))?

 but when I try to use this:

 ?php echo $html-input('Picture/picaddr', array('size' = '40'))?

 nothing appears in the text field in my edit view.

 Any idea what I am doing wrong? 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: Associations cross databases

2007-02-20 Thread nate

All you have to do is set the 'persistent' key to false in both
connections, and the driver will set the $new_link parameter itself.

On Feb 20, 6:53 pm, Grant Cox [EMAIL PROTECTED] wrote:
 It should just work - just make sure you have the appropriate
 connections in your app/config/database.php, and that each model has
 the appropriate $useDbConfig set.

 The only thing that can mess it up, is a bug, apparently in MySQL,
 where connections to multiple databases need to have different
 usernames and passwords. So, in your app/config/database.php, each
 connection needs to connect with a different username/password.

 I found out about this from someone on the IRC channel (probably
 PhpNut) some months ago, but I didn't keep a note of any urls for more
 information...


--~--~-~--~~~---~--~~
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: Dynamically adding validation rules?

2007-02-20 Thread Mikee Freedom

hey Woody,

I don't know if I'm the right person to answer your question but... I
can't see anything wrong with your method. I might think about keeping
all my validation rules in my model and simply removing those that
aren't required (in beforeValidate). Same thing at the end of the day.

HTH,
mikee

On 19/02/07, the_woodsman [EMAIL PROTECTED] wrote:

 Hi Bakers,

 I want to get your opinions on the best approach to a feature i need.

 I have a model, who's table has a field called full_details  (enum
 with Y, N ).
 If the row has this set to N, only a few of its fields need to be
 validated  - if it's set to Y, most fields require validation.

 My current thinking is to change the model's beforeValidate callback,
 which looks at the current record/details for the new record, and if
 full_details='Y', it dynamically add new validation rules to the model
 - i.e something like

 $this-validate['field_name']='VALID_NOT_EMPTY'  //do this for various
 fields

 The model's standard validation would then pick this up.

 Is this a good approach? Are they any 'gotchas' about it?
 Are there others approaches I haven't thought of?

 Thanks in advance,

 Woody


 


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



css problem

2007-02-20 Thread anandrv

Hi all,
In my project i want to write a different table(html) in the page but
the style sheet file is commenly writen table class i want to change
the one more class in css file left side table is width=95 body
table width is 450 and right table width is 115 how it is doing give
me sample coding and suggestion
Thanks and Regards,


--~--~-~--~~~---~--~~
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: requestAction() problem when called from plugin

2007-02-20 Thread Dr. Tarique Sani

On 2/21/07, Langdon Stevenson [EMAIL PROTECTED] wrote:
  It seems likely that this issue is related to this thread:

 http://groups.google.com/group/cake-php/browse_thread/thread/7bf93ea9c79fe57e/

Most likely but this was fixed in v1.1.11 (onwards)

Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
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: css problem

2007-02-20 Thread Dr. Tarique Sani

On 2/21/07, anandrv [EMAIL PROTECTED] wrote:

 table width is 450 and right table width is 115 how it is doing give
 me sample coding and suggestion

Please explain how is this problem of yours related to CakePHP?

Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
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: css problem

2007-02-20 Thread Dr. Tarique Sani

On 2/21/07, anandrv [EMAIL PROTECTED] wrote:
 project normally we are calling table class=classname like that
 how to call this new table class .

So what is preventing you from using table class=classname in your view?

Just write a new class and do it like you would normally do (no puns
or insinuations intended ;) )

HTH

Tarique
-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
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: requestAction() problem when called from plugin

2007-02-20 Thread Langdon Stevenson

Dr. Tarique Sani wrote:
 On 2/21/07, Langdon Stevenson [EMAIL PROTECTED] wrote:
   It seems likely that this issue is related to this thread:
 http://groups.google.com/group/cake-php/browse_thread/thread/7bf93ea9c79fe57e/
 
 Most likely but this was fixed in v1.1.11 (onwards)

Sorry, should have checked and mentioned the version I am using.

Have just checked and this particular project is on an older version of 
Cake that I haven't upgraded yet.  Guess it's time to upgrade.

Thanks for the pointer.

Langdon

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



Manipulating the right hand side of the conditions array in find/findAll queries

2007-02-20 Thread ianh

Hi all,

I'm working on an app to allow people to book courses online. I want
users to be able to select courses by the day on which they are held.
I have a start date (in datetime format) and have been trying to
create a conditions array a bit like this:

$conditions = aa('dayofweek(Course.start)', $var);

The statement generated by Cake has this at the end: AND
(`dayofweek(Course`.`start)` = '2')
but unsurprisingly the DB returns 1054: Unknown column
'dayofweek(Course.start)' in 'where clause'

Does anybody know if the above possible using find/findAll or am I
going to need to resort to a query?

Thanks, Ian


--~--~-~--~~~---~--~~
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: Old release downloads and subversion history...

2007-02-20 Thread AD7six



On Feb 21, 1:01 am, Grant Cox [EMAIL PROTECTED] wrote:
 You can check out every revision through Subversion, 
 viahttps://svn.cakephp.org/repo/trunk/cake/1.1.x.x/

 You should find minimal changes migrating to 1.1.13 (the latest 1.1.x
 code).  Look through the old release announcements from PhpNut - he
 will mention in those anything that changed that would break previous
 code (like lazy model loading).  But up to 1.1.13, there won't be
 many.

Hi TheIdeaMan,

What problems/syntax changes are you referring to with upgrading to a
newer 1.1 version? You will probably find ehat if you upgrade to the
latest 1.1 and check the release notes, you can resolve issues (or at
least identify why) rather quickly.

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