I am using cakephp default restfull apis and created a new controller with
default app of cakephp but as for now i have removed auth and without outh
apis are working fine but for security purpose i have to add authentication
and i have a user login part also so please can anyone help me to add
i am using checkbox array in my form and save their values "," separated in
database. so when i go into edit view of this post then it`s get default
value of field which is set by controller so i want to disable it for some
fields. how i can do it??
--
Like Us on FaceBook https://www.facebook.
Hi,
I am using CakePHP3.0 getting
*Notice* (8): Undefined variable: color [*APP/Template\Pages\myshow.ctp*, line
*2*]
how can fix this error?
Here is my full code:
redirect('/');
}
$page = $subpage = null;
if (!empty($path[0])) {
$page = $path[0];
Oh Yes !!
Thanks a lot.
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsub
Thanks for reply but still won't work.
Question model:
>
> public $hasMany = array(
> 'Option' => array(
> ...
> 'dependent' => true
> )
> );
>
>
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/C
Hello Everyone,
I need to delete associated records.
I have tried but can't figure it out.
Here is my situation,
Database,
questions {id(pk), question, answer}
options {id(pk), question_id, option_value}
Models,
Question
..
public $hasMany = array( 'Option' => array('dependant' => true
Not entirely sure what you're looking for here. Regarding a simple way to
to output data from the model, it seems simple enough to do:
Field:
If you're looking for how FormHelper->label() formats the field name, you
could reimplement the label function
- http://api20.cakephp.org/view_source/f
Thanks for correcting - I'm operating at 50% on Mondays.
On Monday, August 20, 2012 11:43:55 AM UTC-5, Chetan Patel wrote:
>
> Hello friends,
>
> you can use below ideas,
>
> App::import('Model', 'Route');
>
> $route1 = new Route();
> $route2 = new Route();
>
>
> --
> Thanks & Regards
>
> Chetan
try
$route1 = App::import('Model', 'Route');
$route2 = App::import('Model', 'Route');
$route1->id = 2;
$route2->id = 1;
On Monday, August 20, 2012 5:23:36 AM UTC-5, WayneW wrote:
>
> Beginner here. I have a model class called "Route" and I've been
> struggling to find documentation / tutorials
Is there any good tutorial on how to do authentication via REST? Ideally
implementing Oauth 2.0.
On Monday, July 30, 2012 8:02:57 AM UTC-5, Dr. Tarique Sani wrote:
>
> You can use whatever you want even javascript :-)
>
> T
>
> On Mon, Jul 30, 2012 at 6:09 PM, Mariano C. <> wrote:
> > And so I
I actually tried using the CakePHP 2.0 PayPal plugin yesterday but still
found it broken. I was working on updating it, but I want to check out
Quixotix class first.
On Wednesday, June 6, 2012 4:54:45 AM UTC-7, thqloz wrote:
>
> Good Afternoon,
>
> I was looking for something similar and I foun
Recommend you use CSS for this. Attach a class to the input
code:
echo $this->Form->input('username', array('class'=>'username'));
css:
input.username { width: 120px; }
On Tuesday, May 15, 2012 7:31:02 AM UTC-5, Daniel wrote:
>
> How do you set the physical (pixel) width of an input field?
> Fo
Hey guys - I've written a simple application for a non-profit
organization. I won't be able to fully support and maintain the code
and looking to find a service provider to take it over. Are there
companies that do that type of stuff? Any recommendations
--
Our newest site for the community: Cake
Hi,
I wrote
http://www.sanisoft.com/blog/2010/06/21/cakephp-cache-views-by-domain-a-cache-helper/a
while back, may help you.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Wed, May 18, 2011 at 2:56 PM, Lorenzo Bettini
wrote:
> Hi
>
> I'm still struggling
Hi,
I think you are talking about ACL, not
authentication. $this->Auth->userScope used as condition while doing login
and it doesn't provide mechanism to access or deny particular user to
particular page.
Hope that helps.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisof
Hi,
Off topic, for performance improvement, use isset() instead of
array_key_exists()
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Mon, Feb 7, 2011 at 12:52 PM, chris...@yahoo.com wrote:
> Ok,
> I manage to do that...
> here is what works
>
>
Hi,
You can log all the errors including fatal ones by using 'error_log' setting
in php.ini, for example, my php.ini has
log_errors = On
error_log = /home/amit/Web/demos/php/logs/php_errors.log
Then if there is any fatal error, I get an entry in php_errors.log like
[04-Feb-2011 10:
Hi,
Think again :)
How can fatal error be logged when PHP is dead?
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Thu, Feb 3, 2011 at 2:52 PM, bbf wrote:
> Cake 1.3.7
>
> core.php:
> Configure::write('debug', 0);
> Configure::write('log
r's posts using
foreach ($author['Post'] as $post)
then $post['Tag'] will contain the list of tags assigned to that particular
post.
Hope that helps.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Tue, Feb 1, 2011 at 3:49 AM, Hill180 wrote:
>
Hi,
As per the code at http://api13.cakephp.org/view_source/controller/#l-1060and
http://api13.cakephp.org/view_source/controller/#l-1128 , I don't think
paginate() can sort using the field of model which has more than one level
deep relation with the paginated model.
Amit Badkas
Hi,
By setting 'empty' to false won't display the empty option but you need to
set an extra option having label as 'select state', right? For this, set
'empty' => 'select state' instead of false in the 4th argument of select().
Hope that helps
Hi,
Both the fields in the form are multi-select, so how you want to save the
data? Will all selected users relate to all selected exercises?
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Fri, Jan 28, 2011 at 4:07 AM, cake bake wrote:
> is there any way to s
Hi,
Have you outputted the authentication flash message (mostly in layout) using
following code?
echo $session->flash('auth');
You can also set your own error message when login fails, please have a look
at http://book.cakephp.org/view/1272/loginError
Hope this helps.
Ami
Hi,
I already knew what you need and I can provide you the code but I think you
should refer http://book.cakephp.org/view/1231/Pagination and learn by
yourself how to use conditions, limit, order etc. for pagination.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Fri, Jan
Hi,
I think you need to set parameters for pagination, please have a look at
http://book.cakephp.org/view/1232/Controller-Setup
Hope this helps.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Fri, Jan 21, 2011 at 2:36 PM, OldWest wrote:
> Ok. Can you recommend a pro
Hi,
You are fetching active records in $active variable but that variable is not
being used anywhere. That's why the paginated results are not
affected.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Fri, Jan 21, 2011 at 2:27 PM, OldWest wrote:
> Ok the error
' => 1) // Gets all active=1
plan_details.
);
return $this->find('all', $findParameters);
}
Hope this helps.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Fri, Jan 21, 2011 at 2:04 PM, OldWest wrote:
> I am contin
Hi,
I think you need to try Tree behavior, please have a look at
http://book.cakephp.org/view/1339/Tree
Hope this helps.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Thu, Jan 20, 2011 at 1:14 PM, josef corley wrote:
> Howdy. ^^
>
> I'm a noob at this s
basics, then
please refer http://book.cakephp.org first and try to build a basic blog
application (http://book.cakephp.org/view/1528/Blog).
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Thu, Jan 20, 2011 at 1:56 PM, andy_the ultimate baker <
anandghaywankar...@gmail.com> wrote:
>
Hi,
Have you corrected field names in view (e.g., 'filedata' instead
of 'Image/filedata')?
Also provide 'type' as 'file' to Form->create(). For example, Form->create('Image', array('action'=>'admin_upload', 't
lso the code in controller's action is
$file = $this->data['Image']['images'];
but it should be
$file = $this->data['Image']['filedata'];
as the file upload field's name is 'filedata', not 'images'.
Hope this help
Hi,
What is the error you are facing?
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Thu, Jan 20, 2011 at 11:17 AM, andy_the ultimate baker <
anandghaywankar...@gmail.com> wrote:
> hi there,
> i working on image uploading, but i m facing an error,
> can an
Hi,
Form helper's select() method needs attributes as 4th argument and not 3rd,
so following should be the correct syntax
Form->select('dienstmodell', $dienstmodelle,
null, array('empty' => false)); ?>
Hope this helps.
Amit Badkas
PHP Applications for E-Biz:
p
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
> more options, visit this group at
> http://groups.google.com/group/cake-php
>
Amit Badkas
PHP Applications for E-Biz: http://www.sa
Hi,
You need to use saveAll(), have a look at
http://book.cakephp.org/view/1032/Saving-Related-Model-Data-hasOne-hasMany-belongsTo
Hope this helps.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Wed, Jan 19, 2011 at 5:00 PM, Jens Dittrich wrote:
> Hello!
>
>
[type_id] => 1
[item_id] => 1250
[old_qty] => 10
[new_qty] => 9
)
)
)
$this->Item->saveAll($item);
Above will work fine.
Hope this helps.
A
Hi,
If you are having 'call to a member of a non-object' error for $this->Form
then I doubt you are using CakePHP 1.2.x and not 1.3.x
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Wed, Jan 19, 2011 at 5:38 AM, Kh3ops wrote:
> Actually, I baked my appl
Hi,
You need to use
$this->redirect($this->Auth->logout());
instead of
$this->redirect(array('action'=>'login'));
in users controller's logout action.
Hope this helps.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Wed, Jan
Hi,
As per the $status array structure, you should use $status[0][0]['time']
Hope this helps.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Wed, Jan 19, 2011 at 12:24 PM, ojonam wrote:
> Hi,
>
> I have a model Status with fields 'name',
to earn launch referral
bonus on every new registration.
http://www.PaisaLive.com/register.asp?1354913-4842784<http://www.paisalive.com/register.asp?1354913-4842784>
PaisaLive - Get Paid to read emails
{Amit Rawat}
Check out the new CakePHP Questions site http://cakeqs.org and help othe
Hi,
I think you want to do something like following, right?
function save($data = null)
{
$data[$this->alias]['some_field_name'] = 'some_value'; //
or $data[$this->alias]['some_field_name'] = 'some_value';
return parent::save
Hi,
There are 3 methods for this
First is to pass selected value as an array like this
array(
'day' => 13,
'month' => 1,
'year' => 2011,
);
Second one is to use string like 2011-01-13.
And third one is use timestamp generated by mktime() or time()
Hi,
The error is 'Fatal error: Call to a member function html() on a non-object
in /var/www/site/app/views/layouts/default.ctp on line 2', so I want to see
what have you written on 2nd line of default.ctp layout because I don't
think there is any helper method like html().
A
Hi,
The app/tmp directory should be recursively writable by the web server if
PHP is installed as a module (for example, with Apache) otherwise (for
example, with IIS) should be recursively writable by the user which runs
PHP.
Hope this helps.
Amit Badkas
PHP Applications for E-Biz: http
Hi,
If you need this for only a single page then it would be fine to write the
'if' conditions to that action otherwise you can use beforeRender() callback
to change view file's name to render.
Hope this helps.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
Hi,
Have you tested in Firefox with Firebug if the AJAX request goes or not?
Also try to access the AJAX page (something like
http://your-domain/your-directory/cities/getcities) directly in the browser
to check if it outputs what you need.
Hope this helps.
Amit Badkas
PHP Applications for E
Hi,
Sure, you can do that by using $this->query() in the model.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Wed, Jan 12, 2011 at 6:49 PM, Gopinath T.M wrote:
> Shall we use model without association...instead of association shall
> we use direct query
AllowOverride directive)?
Hope this helps.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Wed, Jan 12, 2011 at 5:58 PM, masud wrote:
> Hello there.
> I have create a subdomain on my godaddy hosting. my previeous site was
> made by CakePHP now i want to make a
ails view and back to the index view it gives me the message 'your job
has been updated'." and now you are asking "How can I refresh the page to
remove the flash message from the page?". So, I am confused about what
exactly you need. Please be specific about your
Hi,
The saveAll() internally calls save(), that's why I suggested to use
beforeSave(). Are you passing any option to saveAll() other than data?
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Tue, Jan 11, 2011 at 5:11 PM, Zeu5 wrote:
> Thank you Amit, but the sa
Hi,
I think you need to try beforeSave() instead of beforeValidate(), hope it
may work.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Tue, Jan 11, 2011 at 5:02 PM, Zeu5 wrote:
> let say my model Link has 3 fields
> route, model, action,
>
> what I want is t
Hi,
You can check in the old code, in which file does the 'function __l' string
contain.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Tue, Jan 11, 2011 at 2:39 PM, osamo101 wrote:
> Hi Amit,
>
> This is very strange, the __l() is repeated in the cod
Hi,
I don't think there is/was any __l() function in CakePHP-1.2.x, it may be
written in any file which got overwritten.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Tue, Jan 11, 2011 at 12:09 PM, osamo101 wrote:
> Hello,
>
> I have a website written
Hi,
Your description of the validation problem is too less to give any
suggestion. Also about the usage of $form instead of $this->Form, you can
use $form in CakePHP-1.3.x but it will be removed in future versions and
that's why you have to use $this->Form.
Amit Badkas
PHP Applica
Hi,
http://book.cakephp.org/view/1114/Plugin-Models doesn't have what you
mentioned. It uses model name as 'PizzaOrder' and not 'PizzaOrderModel'.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Tue, Jan 11, 2011 at 5:42 AM, Parris wrote:
> H
Hi,
The error message itself has information for file and line number
('C:\xampp\htdocs\todo\app\models\post.php:9')
you need to look at.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Mon, Jan 10, 2011 at 5:09 PM, Deepak wrote:
> Warning (2): Cannot
Hi,
Could you please show me the structure of categories table. I need to know
surely if Product belongs to Category or Product has many Category or
Product has and belongs to many Category.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Sat, Jan 8, 2011 at 1:25 AM, TSG
Hi,
Does the details page output flash message? You don't need to delete flash
message in session explicitly, $this->Session->flash() does it
automagically.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Sat, Jan 8, 2011 at 1:13 AM, lvdb wrote:
> Hello,
&
er' => 'users', 'action' => 'view'));
} else {
debug($this->User->validationErrors);
$this->Session->setFlash(__('Sorry, a problem occurred trying to save
your account information. Please, try again.', true));
}
Amit Badkas
PHP Applicat
Hi.
I think the line
if(!$this->GroupMember->save($this->$member))
should be
if($this->GroupMember->save($member))
Hope this helps.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Fri, Jan 7, 2011 at 10:22 AM, chris...@yahoo.com wrote:
> if(!$this-
=>
'', 'action' => '');
or if you have more than one or want a generic solution then try
$this->Auth->logoutRedirect = '//';
You can use above in the views too to build URLs for the links.
Hope this helps.
Amit Badkas
PHP Applications for E-Biz
Hi,
The code in action uses $id but from where does it come/initialize?
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Thu, Jan 6, 2011 at 1:55 AM, chris...@yahoo.com wrote:
> Hi guys,
> I need help with video points,... I'm creating feature that users ca
the
'logoutRedirect' URL but as per the
http://book.cakephp.org/view/950/Prefix-Routing, there is nothing
like 'Routing.admin' configuration option.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Wed, Jan 5, 2011 at 10:52 PM, John Maxim wrote:
>
> http
Hi,
Please have a look at http://book.cakephp.org/view/1608/Virtual-fields
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Tue, Jan 4, 2011 at 2:41 PM, Gazmend Nrecaj wrote:
> Hi,
>
> I have a users table with columns firstName and lastName, and want in a
&g
Hi,
Please have a look at 'Sub-queries' section of
http://book.cakephp.org/view/1030/Complex-Find-Conditions (at the end of the
page), hope it helps.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Fri, Dec 31, 2010 at 8:15 PM, aughrt wrote:
> Hello!
>
&
x27;logout')),array('controller'=>'users','action'=>'logout'),
*array('escape' => false)*);
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Fri, Dec 31, 2010 at 3:05 PM, poor-grammar wrote:
> echo $this->
Hi,
Try the command by replacing $aroAlias (this should be any record's value in
aros table for alias field) and $acoAlias (this should be any record's value
in acos table for alias field) with their proper values.
Hope this helps.
Amit Badkas
PHP Applications for E
Hi,
Add following code at the end of myAction() method, so that it won't try to
render the view
$this->render(false);
Also look at the SQL queries if 'aros' table is populating correctly or not
by setting debug level to 2.
Hope this helps.
Amit Badkas
PHP Applicatio
Hi,
What are the actual values of $aroAlias and $acoAlias variables?
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Fri, Dec 31, 2010 at 11:47 AM, John Maxim wrote:
> I have tried:
>
> >cake acl grant $aroAlias $acoAlias
> ---
> Error: Wrong number o
Hi,
I meant that you need to access the method myAction() from URL so that the
code in that method will get executed and according to that code, the dummy
records will get populated to 'aros' table.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Fri, Dec 31, 20
Hi,
>From the data you posted, it seems that they are properly inserting in table
as the IDs are incrementing. If you are displaying that data anywhere and
you need to sort/order them in a particular way then use 'order' parameter
while finding the records.
Amit Badkas
PHP Appli
Hi,
Please have a look at
http://book.cakephp.org/view/949/Passing-parameters-to-action, hope this
helps.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Thu, Dec 30, 2010 at 3:15 PM, talisker wrote:
> Hello!
>
> I need just this: go directy to an action wi
'action' => 'index',
'lang' => 'esp'
));
Hope this helps.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Fri, Dec 31, 2010 at 2:50 AM, talisker
...)
)
)
After this, you need to modify the 'view' to display qualification name
in 'related qualificationlookups' table.
Hope this helps.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Thu, Dec 30, 2010
Hi,
I think you are asking this question at a wrong place as it is more of a
HTML/Javascript related than PHP/CakePHP. Have you ever
done AJAX using onchange in a simple HTML/PHP application using jQuery or
javascript etc.?
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On
Hi,
Have you executed the code in anyAction() to populate ACL tables with dummy
data, something like http://
//users/anyAction?
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Thu, Dec 30, 2010 at 8:39 PM, John Maxim wrote:
> Hi everyone,
>
> While working on t
Hi,
Please have a look at
http://book.cakephp.org/view/1030/Complex-Find-Conditions, you will get the
solution definitely.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Thu, Dec 30, 2010 at 5:37 PM, Miqdad Ali wrote:
> $qry="select * from enrollments where pr
Hi.
You don't need 'AND' key,
$conditions = array(
'Enrollment.program_id'=>12,
'OR'=>array(
'Enrollment.semester_id'=>12,
'Enrollment.batch_id'=>23,
)
);
is the correct one
Hi,
The code doesn't seem to be as per CakePHP standard. However, you need to
handle onchange event of a select to save the selected option (probably
using an AJAX request).
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Thu, Dec 30, 2010 at 12:58 AM, roundrightfarm
Hi,
You said that first and last iterations failed to insert. Was there any
errors outputted? Try to
output $this->Enrollment->Appointment->validationErrors array for failed
data. Please remember to test this with debug level 2 so that it will output
errors (if any) as well as SQL queri
Hi,
By default, Auth component redirects to referrer page (if set) otherwise to
the page set in loginRedirect. So you may need to overwrite
'Auth.redirect' session
parameter.
FYI, please have a look at http://book.cakephp.org/view/1270/loginRedirect
Amit Badkas
PHP Applications for E
;]['featured_video_points']);
}
$result=$this->FeaturedVideoPoint->find('list',array('fields'=>array(
featured_video_points'')));
$this->set('points', $result);
}
Enjoy
Amit
Check out the new CakePHP Questions si
Hi,
My question was 'are the ACL tables (aros, acos and aros_acos) populated
correctly?', please refer to
http://book.cakephp.org/view/1543/Simple-Acl-controlled-Application to
understand how to populate ACL tables.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
O
Hi,
Can anyone tell me how to get data(scrap it) from google adword keyword tool
for a particular keyword?
Thanks and Regards,
Amit
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are
Hi,
About 'Undefined index: content' error, you should already know how to fix
it.
About 'DbAcl::check() - Failed ARO/ACO node lookup in permissions check'
error, are the ACL tables (aros, acos and aros_acos) populated correctly?
Amit Badkas
PHP Applications for E-Biz: htt
Hi,
Have you had AccessComponent class defined in
app/controllers/components/access.php?
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Wed, Dec 29, 2010 at 1:30 PM, John Maxim wrote:
> class AccessHelper extends Helper{
>var $helpers = array(&q
Hi,
I think the problem is due to other thing(s). I can't advise much without
looking at all of the code. However, please refer
http://book.cakephp.org/view/1250/Authentication to check if you have set-up
authentication parameters correctly or not.
Hope this helps.
Amit Badkas
PHP Applica
; 'index'));
to go to that page.
Hope this helps.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Wed, Dec 29, 2010 at 10:28 AM, John Maxim wrote:
> Users_controllers.php:
>
>
> var $name = 'Users';
>
>
Hi,
The code posted by you in second mail is the most common way to validate and
save data in a single go but it doesn't mean that you can't do it using
validates() and save(). As you asked in the first mail about what's wrong in
the code, I pointed you to the missing 'set
Hi,
You need to set the data for the model to validate it, please refer
http://book.cakephp.org/view/1182/Validating-Data-from-the-Controller
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Wed, Dec 29, 2010 at 9:36 AM, John Maxim wrote:
> function regis
Hi,
Have you looked at the SQL queries log?
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Mon, Dec 27, 2010 at 11:45 AM, Zeu5 wrote:
> This is the example of the query I want to execute.
> // UPDATE cart_items SET product_price = 2 WHERE product_id = 4 AND id
>
Hi,
The form helper judges the options of a select field according to the
section of field name before '_id'. For example, it uses $departments if
field name is 'department_id', so try to set variable name as 'parents'
instead of 'parentUsers'.
Hope this h
Hi,
Please follow http://book.cakephp.org/view/1528/Blog to build a basic blog
application in CakePHP so that you will get familiar with CakePHP working.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Sun, Dec 26, 2010 at 7:38 PM, Ahmed - CakePHP wrote:
>
>
Hi,
The guide shows you a way to build/implement datasources which you can use
for your models. About the interface, it's upto you how you want it.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Sat, Dec 25, 2010 at 9:54 PM, John Maxim wrote:
> Following the li
Hi,
I didn't know that you need to use saveAll() inside transaction. By default,
saveAll() starts new transaction. So change your saveAll() call from
$result = $this->saveAll($data);
to
$result = $this->saveAll($data, array('atomic' => false));
Hope this helps.
Amit
Hi,
I would use something like following in one of the models to save data for
non-related InnoDB tables
$db =& ConnectionManager::getDataSource($this->useDbConfig);
$db->begin($this);
$db->commit($this);
Hope this helps.
Amit Badkas
PHP Applications for E-Biz: http://www
Hi,
No, $this->render() doesn't stop execution.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Thu, Dec 23, 2010 at 3:47 PM, Stephen wrote:
> Simple question.
>
> I'm reworking some of my code to make it more efficient and user friendly
>
nd some code in it
need to change as per latest version of CakePHP'.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Wed, Dec 22, 2010 at 11:02 PM, georgeman wrote:
> Thanks for the tips. I don't think SaveAll is the solution I am
> looking for.
>
> What
Hi,
By default CakePHP renders app/views/pages/home.ctp view for '/' URL, though
you can change this by making changes in app/config/routes.php
Hope this helps.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Wed, Dec 22, 2010 at 7:53 PM, Nicolas400 wrote:
Hi,
Is your username unique?
if yes then you can use this
$parent_id=$this->User->field('id',array('username'=>$username));
Enjoy
On Thu, Dec 23, 2010 at 6:48 AM, chris...@yahoo.com wrote:
> Hi Amit, thank you for your help. But it didn't work. I may, a
1 - 100 of 314 matches
Mail list logo