Yes, look at the models deleteAll method at:
http://book.cakephp.org/view/692/deleteAll
Using your child model, call the deleteAll method with the conditions
that all records with the parent id (the A) is to be deleted.
Enjoy,
John
On Mar 17, 6:49 am, guille1983 wrote:
> is there a cake magi
Hello,
Since you are adding attributes to a relation, it will not be a pure
"bridge table".
You should create a table called "Ratings" with an attribute and the
relations to musics and users tables, so it could have a view where
you can add the rating attribute. Same for Privacy table.
On 16 mar,
is there a cake magic way to delete all children models of a given
model ? I just want to delete childs not the main model.
Let me explain it to you
Model A has many B, C, D -- hasOne E, F, hasAndBelongsToMany G, H
I want to delete B, C, D, E, F, G, H and keep A
Check out the new CakePHP Q
Hola,
La solución que creo más adecuada para estos casos es gestionar a los
archivos mediante una aplicación, es decir, "simulando" virtualmente
los directorios y almacenar estos datos ya sea en un único directorio
previamente definido o en la base de datos como BLOBs... de esta
manera tu aplicac
Now here's a tricky extension (still determined to avoid AJAX). When
my form fails, and validation errors pop up, how could I have the page
jump to an anchor link connected to the form? The top section of my
page is somewhat large, so I'd like to avoid excessive scrolling with
an anchor link.
+ 1,
Hi,
I was playing with cookies in my CakePHP powered LAMP box with the
Suhosin security patch, and I dicovered (better late than never) than
Suhosin add a srand() call before any rand(), so decrypt any text with
Security:cipher simply doesn't work. Thinking about that, maybe the
use of srand() and
It may be a typo, but you're setting a variable $categories, but
referencing $category in the view.
$this->set('categories', $this->Job->Category->find('list'));
And create the checkbox inputs like this:
input('Category', array('type' => 'select',
'multiple' => 'checkbox', 'label'=>'Categories')
How can I get a model virtual field to show up as the option text in a select
generated by the form helper? Do I have to manually iterate?
Background... I have a User model identical to the Book example, with a
virtual field for "name". Relevant snippet:
var $virtualFields = array(
'name
I am working to build a job board with an admin side for adding jobs
and categories, and a front end for browsing and searching.
On the admin side I have a form for editing/creating jobs.
Each job needs to be able to be assigned to multiple categories. I am
assuming the best way to do this is thr
Oh, just for grins, decided to try and automate this. I have a
Configurations controller where I do some admin stuff for the site,
and I added this function:
function counterCheck( )
{
$counterTemplate =
"UPDATE :atable AS :amodel
SET :counter = (
Having the form submit to the index() function worked brilliantly. To
my surprise, this enabled the automagic validation messages!
All I have to do now is style the messages with CSS, and I have the
trickiest part of my project done. I'll be sure to post a link to the
blog post I plan to write on
Hello Cake Bakers :-)
Am planing to build a social application using CakePHP together with apache
project "Shindig", i tried to read about the integration between both
CakePHP and Shindig but couldn't really find any on google nor the cook
book, anyone did this before using CakePHP & Shindig? if an
Thanks everyone. I'll go the SQL route. Just wanted to make sure I
wasn't missing something obvious!
...Brenda
On Mar 16, 4:28 am, WebbedIT wrote:
> I would also run a SQl query direct on the database using phpMyAdmin
> or the CLI
>
> UPDATE model_a SET model_a.model_b_count = (SELECT COUNT(mode
Ajax is definitely a working solution, but I'm somewhat leary of
requiring users to have javascript enabled (call me a purist :P)
An element is definitely a good idea. I'm still wondering if it would
be possible to pass data as part of a redirect. I've thought of
writing a function to create this
You are welcome! :)
Another idea, which I do sometime use, is to let the index method
process the contact add request.
The way I recognise that the contact add form is the one to process,
is that I name each submit buttons specifically after what they do -
in the contact add form case, it would be
I accidentally hit reply to author, but for anyone else that visits
this thread:
Be sure to check out the Auth component:
http://book.cakephp.org/view/172/Authentication
It's dead simple using this to set up authentication. Coupled with the
ACL component, you have an unstoppable force on your han
I would consider the use of an element to hold the contact form. Then
have the contact form presented in both views!
See http://book.cakephp.org/view/97/Elements for the story on
elements :)
Later you may consider using an AJAX solution.
Enjoy,
John
On Mar 16, 9:48 pm, Johnny Ferguson wrote:
Hi,
I've poured over all the documentation I possibly can, and searched
the newsgroups, and haven't yet found a solution to my problem.
I'm creating a contact form which doesn't use any databases. As the
controller action never calls save(), I don't get any of the nice
automatic validation.
Here
Hola,
On Mar 16, 8:10 am, josulin wrote:
> ¿Alguien ha conseguido solucionar un problema similar en una
> aplicación cake? Otra posibilidad que contemplo es tener que cambiar
> la programación para utilizar las funciones para ejecutar comandos ftp
> desde php, pero antes de hacer el cambio en la
I'm just starting on a site that will have several types of users and
am uncertain of the best approach to take. I'd like to hear from
others who have done something similar.
The site will have the following user types:
Administrators
Members
Affiliates
Admins may or not be Members. Affiliates w
On Mar 16, 11:55 am, Marcelo Andrade wrote:
>
> The problem is not only the 6 more chars, but as open short tags are
> deprecated (and AFAIK will be removed in php 6), if you insist using
> it, you'll face this kind of problem when deploying you application in
> other servers.
This is the first I
On Sun, Mar 14, 2010 at 8:38 PM, anak newbie wrote:
> Yeap, you're right!
>
> but somehow open_short_tag affect in making template more clean
>
> i see it's support on another framework and i don't talk about comparing
> something :D
>
> Just an idea
The problem is not only the 6 more chars, but
Mike - this looks really slick. Awesome work. I'm definitely going to
be incorporating this into a couple of upcoming projects.
On Mar 15, 6:12 pm, Mike wrote:
> If your looking for a shoppingcart plugin for CakePHP that is
> distributed under the MIT License, here you
> go...http://code.google.
actually you havent set the display option to show error in your view file
isFieldError('Inventory.make'))
e($form->error('Inventory.make', null, array('class' => 'message')));
hope this solves your problem
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their C
Hello All,
I currently have 2 tables: users & musics
I want to have two different Many To Many relations between them:
users_musics_rating which would store the user's rating for a specific
music
users_musics_privacy which determines which user should see a specific
music
how can this be done in
I live in Chicago and I naturally recommend my city (because I want to
attend). I hope it's beyond doubt that in central US, Chicago should
be picked over St. Louis, Indianapolis, Detroit, or any other city.
However, I imagine that New York, being a bigger city, would get more
votes. Nothing's wro
Well first off, the grammar of PHP is unambiguous so you should be
able to use a regular expression to convert all the short tags. Here's
a linux command to replace one string with another in all text files
in a folder
grep -rl ‘OLD’ . | xargs sed -i -e ’s/OLD/NEW/’
But you need to modify this to
Thanks!
Again, sort of off topic, but if anyone knows of a good cakephp book,
there are a few on amazon
http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=cakephp&x=0&y=0
but they have mixed reviews, any opinions?
Thanks again,
Travis
On Mar 15, 6:53 pm, "Alan Asher"
Please provide more information!
What have you tried yourself (show the code that you have written)?
Include which version of CakePHP you are using!
Then maybe we may be able to point you in the right direction :)
Enjoy,
John
On Mar 16, 3:34 pm, stevec wrote:
> But I want to insert the session
Please provide more information, so that we may better be able to
assist you!
What does the code look like at lines 155, 179 and 182 in the
baseclass.php file?
Which version of CakePHP are you using?
Which version of PHP are you using?
Enjoy,
John
On Mar 16, 4:18 pm, Hitesh Anjara wrote:
> hi,
hi,
I have implemented all contact grabber, but i could not success on
that.
but when i try to submit email and password at that time these all
error occurs,
i had try my best to solved these errors:
Warning: Call-time pass-by-reference has been deprecated in /var/www/
general/hitesh/grabb
OpenID is not just for a few people:
If your users have a Google profile, a Twitter, Facebook, MySpace,
Blogger, or a flickr account they can just log into your site.
If they're new members of your site, your OpenID component fetches the
account information from one of these providers.
All your use
But I want to insert the session data (e.g. login id) and the form of
web page synchronously after the user login the webpage.
On 3月16日, 下午7時40分, Jeremy Burns wrote:
> I do this and it works well. Follow these
> instructions:http://book.cakephp.org/view/1310/Sessions
>
> Jeremy Burns
> jeremyb
Buenas tardes. Tengo un problema de incompatibilidad entre safe_mode y
la creacion de directorios y subdirectorios. Sé que es un problema
propio de php, pero no sé si alguien habrá solucionado el problema en
alguna aplicación cake.
El tema es que tengo que crear una estructura similar a app/tmp/
u
You don't want to get your hands dirty with someone elses code!
Best way is to start here:
http://book.cakephp.org/view/4/Beginning-With-CakePHP
and when the installation is ready, continue with this:
http://book.cakephp.org/view/218/Tutorials-Examples
That will give you a good introduction to Ca
I do this and it works well. Follow these instructions:
http://book.cakephp.org/view/1310/Sessions
Jeremy Burns
jeremybu...@me.com
On 16 Mar 2010, at 07:11, stevec wrote:
> I would like store session data (e.g. login id) and form data to
> database
>
> Anyone know how to do this??
>
> Please
Putting everything in beforeRender sorted it. I will be sure to read
up no their differences - the appError mentioned by Dr. Loboto.
This was my first post on the group, thanks for making it a successful
one :)
On Mar 16, 10:54 am, euromark wrote:
> matthew, you dont use beforeFilter() to pass v
Hi I am new to cakePHP and i am really interested to learn. But i am
stuck from where to begin! So can any body please send me a CRUD
application build in CakePHP with authentication? If possible the
admin module to manage the application.
Tashi
Check out the new CakePHP Questions site http://cak
I would like store session data (e.g. login id) and form data to
database
Anyone know how to do this??
Please help me
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 subscribed to the Goo
Yep, I had what appears to be the classic problem getting through the
blog tutorial on my mac running OSX 10.5.8. 404 Not Found errors
rather than proper mapping of the nice url's. Yes, the .htaccess files
were in place. Yes AllowOverride was allowed. Yes the mod_rewrite
module was installed. IN FA
WebbedIT, I really appreciate your input, thank you.
I'll go discuss it with myself and add your words to the case.
On Mar 16, 11:12 am, WebbedIT wrote:
> @Yura: Dismissing LunarDraco as being 'overly dramatic' when he raises
> an extremely important issue shows you're so blinded by how good you
matthew, you dont use beforeFilter() to pass variables to the view
especially due to the problem that it is not invoked on errors
use beforeRender() for it! this will always be called - not matter
what
On 16 Mrz., 06:44, "Dr. Loboto" wrote:
> I know the only way - create AppError, define there
@Yura: Dismissing LunarDraco as being 'overly dramatic' when he raises
an extremely important issue shows you're so blinded by how good you
believe your concept to be that you are ignoring the very opinions you
have canvassed from the community.
I am a web developer, host and - despite my best att
I would also run a SQl query direct on the database using phpMyAdmin
or the CLI
UPDATE model_a SET model_a.model_b_count = (SELECT COUNT(model_b.id)
FROM model_b WHERE model_b.model_a_id = model_a.id)
HTH
Paul
Check out the new CakePHP Questions site http://cakeqs.org and help others with
thei
The tmp directories aren't affected, I only upload the controllers/
views/layouts that I've modified. The tmp dirs are still chmoded 777.
On 15 Mar, 14:25, Julian 86 wrote:
> How are you working on the server?? Did you push the new code with a
> ftp programm? Then you override the permissions of
Questions!
Is your model file named "word.php" in lower case?
Is your controller file named "words_controller.php" in lower case?
Enjoy,
John
On Mar 15, 8:30 pm, Amish wrote:
> hello, am new to cakephp.
> Would really appreciate if anyone could help me out.
>
> Am just trying to call a model f
46 matches
Mail list logo