Wow, I'm loving cakePHP and have made a ton of progress.
What I'm trying to figure out now is the best approach for the
xml/view/save.
I have my xml loading and figured out and my form, I'm thinking :
A) do I use the bake utility to create a concrete version of my model
(assume to has all the
Hi fusupo,
Yout don't need to delete, you can udpate each row.
http://groups-beta.google.com/group/cake-php/search?group=cake-phpq=save+loopqt_g=Search+this+group
HTH,
AD7six
Please note:
The manual/bakery is a good place to start any quest for info.
The cake search (at the time of writing)
Hi Bingo,
The sql above seems a bit overcomplex, maybe I'm mising something.
Why not:
Create a list of unique Singer/Artist Ids from the song model
Use that list of Ids.
?
To create the singer id list would be something like $data =
$this-Singer-Song-findAll(null,array(DISTINCT
Ps.
Forgot to include this link, which might be useful in creating the
constraint on your Song model:
http://cakephp.org/pastes/show/abc17e6d6081dc7c2f91540668447d9f
HTH,
AD7six
Please note:
The manual/bakery is a good place to start any quest for info.
The cake search (at the time of writing)
I need to post a form using Ajax, without affecting the navigation of
the browser.
I've set the form up using this syntax:
echo $ajax-form('/pages/updateMenusInSession', 'post', array(id =
menuForm));
I've set the event onunload in the body to submit the form when the
user is moving off the
It's a shame it can't be.
I wanted to save the username automatically... Now I have to put the
code '$this-Model-set('user_id', $this-Session-read('User.id'));'
in every controller.
Do you know a better way to do it?
Thanks a lot!
--~--~-~--~~~---~--~~
You
I think you could use a hidden DIV (with display:none) to put the
result of the Ajax request :
echo $ajax-form('/pages/updateMenusInSession', 'post', array(id =
menuForm, update=myHiddenDiv));
--~--~-~--~~~---~--~~
You received this message because you are
Thanks for the reply Leo, however I'm afraid it didn't seem to work
The generated javascript I'm now getting when I view source is this:
script type=text/javascript
Event.observe('menuForm', 'submit', function(event)
{ new Ajax.Updater('myHiddenDiv','/pages/updateMenusInSession',
I'm not sure about this, but see this:
http://manual.cakephp.org/appendix/simple_user_auth
In session 03: Access Checking in your Application
You could follow the same ideia, put your code in AppController and
extend it.
--~--~-~--~~~---~--~~
You received this
I'm not sure what you mean by baking the model - bake is just a
command line application to make model/view/controller stubs (although
stubs doesn't give them much justice, they are very functional). Even
a complete model file will not specify the database fields, except
where needed for
Thanks AD7six and Christoph,
got everything working with minimum SQL and in a clean way...
For others reference.this was my solution
$criteria = array('user_id' = {$userid}); // basicaly get id of the
user
$songlist = $this-SongsUser-findAll($criteria, array('song_id'),
null, null, -1);
The VALID_NOT_EMPTY constant is just a regular expression for
validating strings. I think you'll need a more customized validation
mechanism to do what you want.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
Thanks Finster.
bcos I think it is no use to pass other fields when checking the
specified field and transport many datas at a time.
Any other solutions??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP
Something is wrong with booleans and checkboxes when using PostgreSQL.
I created a ticket and made a clear test case as well. See
https://trac.cakephp.org/ticket/1586
Here's what I've found out so far, please correct me if I'm wrong:
$html-checkbox() expects booleans in $this-data in the native
I do save it like anyone else would - the only sanitization I do is
$this-cleanUpFields()
Firstname and Lastname are two different fields - they aren't combined.
They relate to two different columns in a table (Contact.firstname and
Contact.lastname) that are not supposed to be blank.
Chris:
Open a documentation ticket.
--~--~-~--~~~---~--~~
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
Hi,
there is no need to use sessions in my Applications.
I check the user's cookies before each action with beforeFilter in
app_controller.php. This means I have one extra DB read query per
action - a value that I can live with ;)
Cheers, Marcus
On Oct 25, 4:54 pm, [EMAIL PROTECTED] [EMAIL
Thanks Grant, that does make a lot of sense, I do display a form, the
xml usually has incomplete data that the user needs to update in the
form, so the xml is there just to seed the form. I guess I can read
an example record from the database and then dump the associative array
to a file so I
Felix Geisendörfer wrote:
One of the things that I really like as well is creating
Models for relationships. I think I heard about it first in
David Heinemeier Hansson Keynote Adress at RailsConf '06
(Video
http://blog.scribestudio.com/articles/2006/07/09/david-heinemeier-han
hi bakers
(especially AD7six and Christoph)
Now, I did find a solution for specifying the query, but getting a
trouble on how to set pagination. I want to set the pagination on name,
count or id
any ideas on how to do to set pagination.
Regards
So no one knows about this??
On Oct 25, 11:12 am, Troy Schmidt [EMAIL PROTECTED] wrote:
Okay just trying to keep with the same thread. Has anyone used this
helper? Is this something included now in the Cake core?
-- Forwarded message --
From: zis [EMAIL PROTECTED]
Date:
The loadPluginModels function doesn't check for class existence.This is a problem for me because I have to preload some models from a plugin before the cake dispatcher tries to load the rest of the models. I'm using cake
1.1.8.3544.I attached a patch.- Christoph
Just in case anybody gets the same problem, it seems that when you use
the submit() function on the form, the onsubmit=return false; is NOT
invoked, which means that there will be a non Ajax submission as well
as an ajaxified one.
So it seems the solution is there isn't one, apart from
Ismael, you are correct, there are some oversights in he documentation.
however, when I think about the time I've saved and the functionality
inherent in CakePHP that these fellas have created for me, you and
everyone else... i kind of let it go.
don't forget the other resources around for
i wouldn't have said it was included in the Cake core unless Nate or
someone else has come out and said so in the last 24 hrs.
if it is a successful method then I'm sure you could use it in your own helper.
i have written a html helper of my own that wraps around most of the
existing html
Trailing spaces are dropped in varchar fields, I believe.
Here's the reference:
VARCHAR values are not padded when they are stored. Handling of
trailing spaces is version-dependent. As of MySQL 5.0.3, trailing
spaces are retained when values are stored and retrieved, in
conformance with
Just got this error after setting up Cake on my server. I have other
sites using mod_rewrite without any issues, and I'm not familiar enough
with it to figure out what's happening myself.
I'm using a development style install for now (entire cake structure
inside my htdocs), and the default
FormHelper::select in Cake 1.2 supports optgroup tags, but the code
posted above is definitely not it. To my knowledge, no one has used
this helper. If you think it might be of help to you, by all means,
try it out.
--~--~-~--~~~---~--~~
You received this
I have one main application at example.com, and I'd like to install
another application at app2.example.com. How can I do something like
this, where both apps are utilizing the same cake core?
It would be great if I could put both apps in my www directory on my
host, and then setup the
Hi, I'm new to frameworks and am checking out Cake. I do NOT have
mod-rewrite on my computer but I did set up Cake in the config file to
use pretty URLs instead of Mod rewrite. I'm using the development
install, and I can see the styled default page at localhost/cake and it
says that it can
I have one main application at example.com, and I'd like to install
another application at app2.example.com. How can I do something like
this, where both apps are utilizing the same cake core?
It would be great if I could put both apps in my www directory on my
host, and then setup the
http://manual.cakephp.org/appendix/blog_tutorial
See Section 5.
--~--~-~--~~~---~--~~
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
Thanks, I finished the tutorial!
--~--~-~--~~~---~--~~
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
OK, this maybe a stupid question, but are hasAndBelongsToMany, always
bi-directional?
I.e. I have a Model (Users) and I want to associate it with another
model (Albums). When the association is made I don't want Albums 'used
up', so use HABTM, but what about the reverse?
When setting up the
The solution some what depends on your server config. Do you have
access to the httpd.conf file? How are your sub-domains created?
If you are using CPanel or something like that they create a folder
inside your main site(folder), so in that cause you would move the app
directly into it and set
Hi again, I've moved on to trying out the scaffolding feature on one of
my tables. I set up the model and controller but when I view the
scaffold in my web browser I see all the table data but in the right
most column under actions I get a bunch of errors like:
Notice: Undefined index: id in
Afternoon all,
I've just spent way too much time on my search function trying to make
it as good as possible. I'm a medium level PHP developer so I know
where I want to be but there are a few steps I'm missing in getting
there.
Basically, what I would like is a search function similar to that
Nevermind, forgot 'id' was case sensative...
--~--~-~--~~~---~--~~
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
38 matches
Mail list logo