The plan with mb is to add support for it through the String class. If
mb is not available the String class will handle it on its own.
Several of the needed string functions exist and tests cover the
current functionality. Then, the String class can be implemented in
the TextHelper, among other th
I found it: getAffectedRows(), for anyone who needs it.
Verified it works.
On Dec 15, 5:50 pm, steve <[EMAIL PROTECTED]> wrote:
> Hi, hope that someone has used this check for affected rows already
> and knows how it works in cakePHP.
>
> I'm simply needing to test for affected rows ( i.e.
> mysq
Here is my model
class Question extends AppModel {
var $name = 'Question';
var $validate = array(
'question' => VALID_NOT_EMPTY,
'type_id' => VALID_NOT_EMPTY,
);
//The Associations below have been created with all possible keys,
tho
SHOW PROCESSLIST
On 12/14/07, Grant Cox <[EMAIL PROTECTED]> wrote:
>
>
> How are you checking that you are getting a lot of DESCRIBE queries
> with DEBUG set to 0?
>
>
> On Dec 14, 7:09 am, "Olexandr Melnyk" <[EMAIL PROTECTED]> wrote:
> > Hello bakers,
> >
> > in one of applications I'm working on
Hi, hope that someone has used this check for affected rows already
and knows how it works in cakePHP.
I'm simply needing to test for affected rows ( i.e.
mysql_affected_rows() ).
I did a search in the cakephp API for it and found lastAffected.
If I run an "Update" query on my Post model, and w
I'm just wondering, is there a simple or even feasible way of having
different views for 2 different domains - but the same model and
controller? Ie, both websites so to speak will be exactly the same in
content but just differ in appearance.. maybe I could do this in
routes.. I'm not sure.. any
$this->findBy* from the User model
you can access the associated model using $this->AssociatedModel-
>find...
you should stick most of the model/query stuff inside models (fat
models, thin controllers)
loading models is an option but it really depends on the situation -
generally you shouldnt lo
Use... $this->data[$this->name]['fieldname']
function checkEmpty($value) {
$valid = false;
if ($value == 'c' && !empty($this->data[$this->name]['field4']) {
$valid = true;
} elseif (($value == 'a' || $value == 'b') &&
I inspected the model passed in in the setup(), beforeValidate(),
beforeSave() and afterSave() methods in the Behavior I'm writing, and
the $model->data element only had the data for the main model; I
couldn't find the child model's data in the Behavior's scope. It
looks like the the full associ
hi chris!
i think i found what you meant ... "custom validation methods", right?
but i have one little problem. i don't know how to access field2,
field3, field4 when validating field1...
here's my approach:
var $validate = array(
'field1' => array(
'rule' => array('chec
Can you give any more details on how to access the related model's
data (child models) in the beforeSave(&$model) callback? I just tried
it out and couldn't find the associated model's data in
$model->data
or
$model->ChildModel->data
Thanks,
Rich
--~--~-~--~~~---~-
Thanks, it works.
On 15 dec., 22:15, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> In app_controller i add
>
> function connectNamed($data=null,$exclude=array()) {
> if (!isset($data)) {
> $data=$this->passedArgs;
> }
>
Can someone help me out? I'd like to build a forum using CakePHP. I'll
end up documenting my efforts in a tutorial at some point.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group
In app_controller i add
function connectNamed($data=null,$exclude=array()) {
if (!isset($data)) {
$data=$this->passedArgs;
}
if (!is_array($data)) return;
foreach ($data as $key => $value) {
On Dec 15, 2007 3:26 PM, mclee <[EMAIL PROTECTED]> wrote:
>
> This is wierd, why so harsh?
>
> Is everybody allowed to commit back to the repository?
> I can send in my code on the Text Helper.
Not harsh, just asking. I mean, if it's so simple then by all means
submit a patch. Best way to do it
I'm using Cakephp 1.2.
I have URL like this: http://xyz.com/admin/news/list/author:7. When I
click on any link generated by Cake's paginator, the author param
dissapears. How to preserve it?
--~--~-~--~~~---~--~~
You received this message because you are subscribe
This is wierd, why so harsh?
Is everybody allowed to commit back to the repository?
I can send in my code on the Text Helper.
On Dec 16, 3:24 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Dec 15, 2007 12:05 PM, mclee <[EMAIL PROTECTED]> wrote:
>
>
>
> > Well, we have 'function_exists', don
awww FORGET IT !
just found that i wrote var $helpers = array('Form'); in the model and
not the controller ...
nevermind :(
On 15 Dez., 21:56, stefuNz <[EMAIL PROTECTED]> wrote:
> Hey ...
> Sorry for my second question this evening ;)
>
> But I just found this error:
>
> Notice (8): Undefined va
Hey ...
Sorry for my second question this evening ;)
But I just found this error:
Notice (8): Undefined variable: form [CORE\app\views\users
\register.thtml, line 66]
Context | Code
$this = array("name" => "Users", "here" => "/cakeproject/users/
register", "parent" => null, "action"
On Dec 15, 2007, at 1:12 PM, Chris Hartjes wrote:
>
> On Dec 15, 2007 3:00 PM, Pillow <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>> I've website which has about 3 uniq visits per day (up to 1500
>> online). The problem is that CMS written on CakePHP consumes too much
>> of CPUs power.
>>
>> Almost
On Dec 15, 2007 3:00 PM, Pillow <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I've website which has about 3 uniq visits per day (up to 1500
> online). The problem is that CMS written on CakePHP consumes too much
> of CPUs power.
>
> Almost everything is beeing cached (whole views, sometimes db
> resul
Hi,
I've website which has about 3 uniq visits per day (up to 1500
online). The problem is that CMS written on CakePHP consumes too much
of CPUs power.
Almost everything is beeing cached (whole views, sometimes db
results).
In addition the same site was earlier driven by some poor free syste
On Dec 15, 2007 2:34 PM, stefuNz <[EMAIL PROTECTED]> wrote:
>
> Hi!
>
> I want to use validation for the following situation:
>
> I have a select field (field1) with options a,b,c
> If field1 is a or b then field2 and field3 may not be empty (text
> fields)
> if field1 is c then field4 may not be
Hi!
I want to use validation for the following situation:
I have a select field (field1) with options a,b,c
If field1 is a or b then field2 and field3 may not be empty (text
fields)
if field1 is c then field4 may not be empty ...
is there a way to use the validation for this or has it to be
"ma
On Dec 15, 2007 12:59 PM, Theo Chakkapark <[EMAIL PROTECTED]> wrote:
>
> I have a website that I'd love to convert to CakePHP, and I was
> wondering if there was a means to use a URL syntax that goes like
> this:
>
> /users//
You can create custom routes that map URL's to controller/action
pairs.
On Dec 15, 2007 12:05 PM, mclee <[EMAIL PROTECTED]> wrote:
>
> Well, we have 'function_exists', don't we?
>
> Surely we can do a degrade if mb_substr is not installed.
>
Are you volunteering to do it?
--
Chris Hartjes
My motto for 2007: "Just build it, damnit!"
@TheKeyboard - http://www.litt
I have a website that I'd love to convert to CakePHP, and I was
wondering if there was a means to use a URL syntax that goes like
this:
/users//
For example, I have a user named "Pete" who would like to post to his
blog; he would go here to do so:
www.website.com/users/Pete/Post
Also, I want t
Well, we have 'function_exists', don't we?
Surely we can do a degrade if mb_substr is not installed.
On Dec 16, 12:51 am, Gwoo <[EMAIL PROTECTED]> wrote:
> Does every php install have mb_substr() ?
--~--~-~--~~~---~--~~
You received this message because you are s
Does every php install have mb_substr() ?
--~--~-~--~~~---~--~~
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
data is cleared out at the end of the Model::save(), so afterSave does
not get it. What I do is set the data for the related model in the
beforeSave, then in the afterSave the related model data is available
and can be saved on its own.
--~--~-~--~~~---~--~~
You rec
I am a php hack making the move to cakephp. So far so good with
setting up the db and baking all the MVCs. You can see everything here
http://cake.reviewfornurses.com
Here is my first of many questions.
I want to be able to add questions on one page that will let me also
add the answers/rationa
Hi,
I'm using CakePHP 1.2.0.5875.
When I dig into the code of Text Helper, I found out that in functions
like
truncate() or excerpt(), it calls substr() instead of multibyte
friendly functions like
mb_substr().
Will this be fixed? Or will there be another Text Helper for
multibytes?
--~--~
hi
If you are trying to return JSON Object, I would suggest doing the
following
1. in your view/users folder, create a json folder
2. withing views/users/json folder create a get_user_details.ctp file
with the following code
object($data); //converts PHP array into JSON object
array
?>
3. $data
make getUserDetails.ctp
set data from controller to this view.
in view use, php json_encode
On Dec 15, 10:56 am, Eli S <[EMAIL PROTECTED]> wrote:
> Hi all,
> I have spent a long time looking for a solution to this without luck.
>
> I am trying to use the excellent JS library Extjs with cake 1.2
Hi all,
I have spent a long time looking for a solution to this without luck.
I am trying to use the excellent JS library Extjs with cake 1.2 latest
build.
I am trying to make a simple ajax request to a controller
layout = 'extadmin';
$this->set('users', $this->User->fin
I've just started using CakePHP and so far it looks great. However,
after reading the manual and putting together a quick try-out site
with scaffolding/bake, a few questions remain..
1. If I go to "http://localhost/users";, it works just fine and the
index page comes up as expected.. but all link
It WAS a huge disaster. I got involved with Cake at that point, and I
almost gave it up because of the huge inaccuracies present in the
Wiki. At any given point there were 3 or 4 suggestions on how to do
each task, and 3 of them would be wrong somewhere along the line - but
of course you wouldn't
for first part check
http://groups.google.com/group/cake-php/browse_thread/thread/6c991fc8bbddd18e/33ec269fdbd366d5?lnk=st&q=gc#33ec269fdbd366d5
On Dec 15, 6:48 am, jarmstrong <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> So I am seeing that the cake_sessions table is not getting automatically
One tip to avoid error messages like this would be to change the
definition of your function to:
function index($username = null) {
That way if a username is not passed, it doesn't break.
BUT, that doesn't solve your problem, which appears to be that the
username isn't being set at all - have y
39 matches
Mail list logo