I have a Book and Author model thats a many to many relationship. I
was wondering if there was a way in the BooksController that i can
filter out books by author name, and in the AuthorsController filter
out authors by book title.
--~--~-~--~~~---~--~~
You
Hi there,
Loving cakephp!
I'm fiddling around with dynamic routes in CakePHP and was getting on
fine until I realised that using App:import will allow me to use a
model within bootstrap.php but breaks any attached behaviors that
model may have for use in a controller.
If it helps, bootstrap
Thanks, but it doesn't work.
Gives me this query:
SELECT `Module`.`id`, `Module`.`position`, `Module`.`name`,
`Module`.`created`, `Module`.`modified` FROM `modules` AS `Module`
WHERE `Version`.`name` = 'covermount'
and this error:
1054: Unknown column 'Version.name' in 'where clause'
On 3 Jul.,
Well, I think the quick tip from nate about ad.hoc joins (
http://bakery.cakephp.org/articles/view/quick-tip-doing-ad-hoc-joins-in-model-find
) is exactly what I need.
I tried it like this:
$checklist = $this-Checklist-Product-Module-find('matches',
array
(
To follow up my question, I found a work around by putting the
following into my Post controller
public function beforeFilter()
{
if(!$this-Post-Behaviors-enabled('Tree'))
{
$this-Post-Behaviors-attach('Tree', array('left' = 'left',
'right' = 'right'));
The answer was actually really simple, I will post here in case it
helps anybody else.
I was trying to over-complicate things and pass a string to the
paginate conditions, when an array was needed. (Now I look back, a
string made no sense at all - but at least I'm learning!)
First step, is to
Zin,
Although, you can create a form without the formHelper, I wouldn't
recommend it for a beginner. You need to be familiar with the form
element naming convention. If you plan to use the securityComponent,
you must use the formHelper.
The helper is there to help you. ;)
-teh
On Jul 4,
centro,
This is covered in the manual.
http://book.cakephp.org/view/78/Associations-Linking-Models-Together#hasAndBelongsToMany-HABTM-83
Good luck.
-teh
On Jul 6, 2:01 am, centr0 centrosc...@gmail.com wrote:
I have a Book and Author model thats a many to many relationship. I
was wondering
I'm using the phpThumb helper to try and automatically generate
thumbnail images of the input
http://bakery.cakephp.org/articles/view/phpthumb-helper-2
In my views/posts/add.ctp I have this line:
echo $form-input('picture');
I basically would like the system to grab the URL to the
Hi,
I just had a look at the CounterCache, but seem to struggle on the
implementation. I added another field to my maincategories
table:
recipes_count
I suppose I have to add now 'counterCache'=true to my Maincategory
model, my relationships are currently looking like this
number9,
Slightly, unrelated... instead of the for-loop, you can use
$child_array=Set::extract('/Category/id', $children);
$child_array[]=$name['Category']['id'];
-teh
On Jul 6, 3:56 am, number9 xpozit...@gmail.com wrote:
The answer was actually really simple, I will post here in case it
Thanks Dan for your input! There were no error messages and debug was
set to 0 though.
But today I found out what was causing the problem.
I had an extra whitespace in the new model file after the ? tag which
resulted in a broken header!
Cheers,
tobi_one
On 25 Jun., 01:57, Dan Bair
Hi all,
i have read too many posts for Autocomplete In cake1.2 . Discussion
was too long but problem remains unresolved. Can anyone tell me exact
solution for this. I have gone through http://bakery.cakephp.org/
articles/view/autocomplete. But its for 1.1.
I have added component in
hii
i want to develop a Spider Crawler to get the information required
from specified website
please anyone help me to do
thank u
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this
Hello,
http://groups.google.com/group/cake-php/browse_thread/thread/8babbaf13192822c/0b31b9bfc3801f18?lnk=gstq=sqlsrv#0b31b9bfc3801f18
Regarding this old thread, has anyone modified the mssql class
appropriately to work with Microsoft's new sqlsrv driver within
CakePHP?
I'm on the fence on
Hi guys,
Hopefully a fairly straight forward question. I have the following two
models: Member, User. User hasOne Member, Member belongsTo User.
In my application, I have a Members admin area, which lists all the
Members. I need to allow the admin to create a corresponding User for
a Member and
Hi
I have a containable model.
I would apply the pagination on the results inside contain.
Example:
Models : Document hasMany User
In documents_controller.php I have this:
$document=$this-Document-find('first',
array(
'fields' = array('Document.*'),
'conditions' =
As I couldn't find a solution, I resorted to add an inner $pluginName
var to my *Plugin*AppModel.
On Jul 4, 8:03 pm, Pixelastic timcc.pe...@gmail.com wrote:
Hello,
I would have wanted to know if there is a way to find the name of the
actual plugin being executed from inside a model method
Hello.
i recently developed a CakePHP app using MSSQL 2005 as DB.
i updated ntwdblib.dll in apache/bin (and in php/bin also) directory
and now cake's mssql driver is working fine :)
On 6 Lug, 16:09, idx idxma...@gmail.com wrote:
Hello,
What dll version is that? The one I have is 2000.2.8.0 . Although I've
read reports of the updated driver not being reliable.
On Mon, Jul 6, 2009 at 10:51 AM, Ernesto e.fanz...@gmail.com wrote:
Hello.
i recently developed a CakePHP app using MSSQL 2005 as DB.
i updated ntwdblib.dll in
Hi all! I'll ask a question first and then I'll give a background to
it for just in case that'd give any insight.
Is it better to query MySQL table once for all posts (which may be
thousands of rows) or about 30 - 50 queries with limit 1?
The reason I ask is that I build a menu of categories
This might require a bit of tweaking, since I've never used the EXISTS
operator with cakephp... but here it goes:
*$categoriesForTree = $Category-find('all', *
* **array('order' = 'lft ASC',*
* **'conditions' = 'EXISTS (SELECT id FROM posts as Post WHERE Category.id
= Post.category_id AND
As an extra.. as far as I know the best practice is to do the smallest
amount of querys you can to the database (even if the resulting dataset is a
bit bigger than needed).. since a big part of the overhead processing comes
from preparing those data to be returned and having the application
On Mon, Jul 6, 2009 at 10:57 AM, bhushan Abhushanahir...@gmail.com wrote:
(..)
controller. and written test_auto() in controller
function test_auto()
{
}
and in view (test_auto.thtml) i have wriiten these lines:
1) Please, use the CakePHP version 1.2.x.
2) To a view
Carlos, thank you for two insightful comments. I wasn't aware of
EXISTS subquery and will try it, then your second comment pretty much
answers my question. Thanks!
On Jul 6, 7:31 pm, Carlos Gonzalez Lavin carloslavi...@gmail.com
wrote:
As an extra.. as far as I know the best practice is to do
Put the code you had in bootstrap in your main app_controller.php in
the beforeFilter() function
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email to
Does anyone know what I need to edit in the console code to modify the
default code that bake renders? As good as bake is I still find that I need
to spend a lot of time going through all the code it creates for me making
the same adjustments each time.
Any hints on what needs to be done would
Hi,
I am considering refactoring a messy company intranet (written in
plain PHP) using a web framework, and as you guessed, CakePHP caught
my eye.
My constraint is that I cannot rewrite it completely from scratch
(hard to convince a manager on that), so I am thinking to gradually
replace
Hi,
I can just give you a hint to a book concerning this topic, maybe it
helps you.
http://littlehart.net/book/
Regards,
Michael
Vincent schrieb:
Hi,
I am considering refactoring a messy company intranet (written in
plain PHP) using a web framework, and as you guessed, CakePHP caught
Michael,
What you propose is totally possible. The idea would be that you would
include all of the original website in the app/wwwroot folder. This would
allow it to be accessed as though it was never modified. The only
restriction is you must use cake-php’s index.php file. You can get
In the controller:
var $paginate = array(
'Document' = array(
'fields' = array('Document.*'),
'contain'=array(
'User'=array(
'fields' = array('User.id','User.surname','User.name'),
'conditions' = array('User.active'=1)
)
)
)
)
);
Hi Everyone,
I did a website using CakePHP. Now I need to do an e-store in this
website using Microsoft ASP and Components.
I need to use VISA Credit Card and VISA did sent me an example that
use ASP and some Components. The Components are already on the server.
What is the best way for me to
ASP and PHP are both separate languages.
On Jul 6, 1:27 pm, simon...@gmail.com simon...@gmail.com wrote:
Hi Everyone,
I did a website using CakePHP. Now I need to do an e-store in this
website using Microsoft ASP and Components.
I need to use VISA Credit Card and VISA did sent me an
Sorry
But I will get the pagination on the users
In the view I must list all users that are in relation with Document
with id=$id and I would ,if it is possible using the pagination for
paginate the users.
On 6 Lug, 21:56, Miles J mileswjohn...@gmail.com wrote:
In the controller:
var
Please let us know if it worked (and if you had to change any part of the
code).. I think some people (myself included) would be interested in knowing
if using EXISTS is as simple as that
2009/7/6 Yura Linnyk yur...@gmail.com
Carlos, thank you for two insightful comments. I wasn't aware of
Martin,
Thanks for responding.
That worked! (using GET) I have been reading up some and looks like
its related
to mod_rewrite. If you have any ideas on getting POST working, please
let me know.
On Jul 6, 12:39 am, Martin Radosta martinrado...@gmail.com wrote:
On 07/06/2009 12:48 AM, stZen
On Jul 6, 9:27 pm, simon...@gmail.com simon...@gmail.com wrote:
Hi Everyone,
I did a website using CakePHP. Now I need to do an e-store in this
website using Microsoft ASP and Components.
I need to use VISA Credit Card and VISA did sent me an example that
use ASP and some Components. The
I am using Cake's PaginateHelper when showing a listing of bands on my
site. So right now, at the bottom I have the page number 1|2|3...
What I would like to do is have the page links turn into alphabetical
ranges.
I know I can get the Paginator to show the alphabet and sort by that,
i.e.
http://book.cakephp.org/view/789/Modify-default-HTML-produced-by-baked-templates
:)
On Jul 6, 1:44 pm, MikeBates mba...@opskwan.com wrote:
Does anyone know what I need to edit in the console code to modify the
default code that bake renders? As good as bake is I still find that I need
to spend
Thanks for the link, but it's not the views (HTML) I want to modify, it's the
controller php code that bake creates.
Brendon Kozlowski wrote:
http://book.cakephp.org/view/789/Modify-default-HTML-produced-by-baked-templates
:)
On Jul 6, 1:44 pm, MikeBates mba...@opskwan.com wrote:
Does
want to ask,i have table stages
but seems that for this particular page,the index cannot be undefined
other than the table and view,where else should i check?
this is the code fragment of the table:
the entire php echo for $stage got error
?php
$i = 0;
foreach ($stages as $stage):
$class
Controller code is built in:
\cake\console\libs\tasks\controller.php
That’s where you need to make changes to bake custom controllers
-Original Message-
From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of MikeBates
Sent: Tuesday, 7 July 2009 12:10 p.m.
To:
Which index? What is the table definition? What is the controller
code? What is the output from debug($stages)?
On Mon, Jul 6, 2009 at 8:35 PM, keanoppykeano0...@gmail.com wrote:
want to ask,i have table stages
but seems that for this particular page,the index cannot be undefined
other than
all index from the stages table, the output for $stage['Phase']['id']
can be shown
for the table stages,i have:
id(pk),phase_id(fk),status,duration,stagesname_id
(fk),p_date,a_date,remarks,created,modified
which part of the controller code?
the output from debug:
include -
Hi,
This is a slightly complicated case related (I think) to the guts of
CakePHP. This is what I have:
1. A controller (Users) that uses Cookie as a component
2. There is a method in Users that uses the Cookie component to write
a cookie
3. Another controller (MyAccount) non related to the
On Mon, Jul 6, 2009 at 9:06 PM, keanoppykeano0...@gmail.com wrote:
all index from the stages table, the output for $stage['Phase']['id']
can be shown
If you're getting an undefined index error, what is the next word in
the error message? It should tell you which index is undefined.
for the
I'm having the same issue. Nothing in the logs, and since debug is off
I can't get error messages. Perms are set correctly on ccss cjs. CSS
packs, but not JS.
On Jun 11, 2:53 am, RyOnLife ryan.mckil...@gmail.com wrote:
I'm tailing my logs and nothing suspicious is turning up.
Re: the #3
You might be able to get around this by creating a component to share
between the 2 controllers and putting the cookie code in there.
On Mon, Jul 6, 2009 at 11:09 PM, Jorgepedretjorgeped...@gmail.com wrote:
Hi,
This is a slightly complicated case related (I think) to the guts of
CakePHP.
To follow up: CSS is packing fine, its JS that's causing all kinds of
problems for Asset Packer. Jquery.1.3.2.min seems to crash the whole
operation. Same for another obfuscated JS file.
On Jul 6, 11:23 pm, Hiero v25me...@gmail.com wrote:
I'm having the same issue. Nothing in the logs, and
Well if its obfuscated/minified ALREADY then it will probably break.
--~--~-~--~~~---~--~~
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 unsubscribe from
Hello,
I had trouble when my perfectly working cake project(with mysql) was
forced into postgresql, but later got that cleared, now i cant get the
update query working.
This is the error that i am getting -
Warning (2): pg_query() [function.pg-query]: Query failed: ERROR: column
Menuitem of
51 matches
Mail list logo