Very right!
Will give the getNumRows() a try andsee how it goes.
Thanks again.
Dave
-Original Message-
From: John Andersen [mailto:j.andersen...@gmail.com]
Sent: October-16-09 3:43 AM
To: CakePHP
Subject: Re: Check Valid
That may be, but it seems to me that you then are performing
That may be, but it seems to me that you then are performing two
queries for each need to retrieve a record, first to ask if there is
any records, and then to ask for the records! (Maybe I am wrong
here!!)
I think that querying for the records, checking for the number
retrieved, should be the opt
There is another that I found.
Model::hasAny
Returns true if a record that meets given conditions exists.
function hasAny($conditions = null) {
return ($this->find('count', array('conditions' => $conditions, 'recursive'
=> -1)) != false);
}
Which I guess is pretty much the same as my validPost
Dear Dave,
Let me tell you that I am convinced that isAjax() is something fake
and falsified (it is just a client side input) and it is not a
standard yet, I am talking about the 'X-Requested-With' header.
I would create a custom controller for the ajax requests or a custm
action in a certain co
Thanks for the info guys.
Basically the idea is a User has a preference represented by a field in the
table 'display' and they can select it as an option so in the site to either
display or not display their information. Its only used in 1 controller but
will try them out and see what works best.
On that point, may what you want to do is declare $display as a class
member (just inside your controller class, not inside a method/action/
callback) like so:
var $_display;
and when you need to set it:
$this->_display = $this->Auth->user('display');
Take note I used the Auth component as it
I think you can use the models method getNumRows() which returns the
number of rows returned in the last query!
Enjoy,
John
On Oct 16, 12:19 am, "Dave Maharaj :: WidePixels.com"
wrote:
> If you have posts 1, 2, and 3 for example and you type in view/4 and there
> is no 4 the page still render
Don't know if it helps but you map two sums to the same column alias
'amount' , I think you should make them unique ...
On Thu, Oct 15, 2009 at 3:13 PM, logout wrote:
>
> Guys,
>
> I have a problem. I tried to write one SQL query useing the CakePHP
> style, but I failed. Can someone help?
>
> He
You cant set a variable within a function and expect it to be usable
again somewhere else. Variables defined in functions are restricted to
the functions scope. You have to set it to the object.
$this->display = $this->Session->read('Auth.User.display');
On Oct 15, 8:20 pm, "Dave Maharaj :: Wide
How can i access session data in beforeRender or before Filter?
i have $display = $this->Session->read('Auth.User.display');
and i have that all over the controller. Is there a way i can define that in
a before function and access it from there instead of that long snip
allover?
I tried
I'm currently using symfony in many large applications but I've tried
Cake on other projects and I've loved the ORM. In this case though I'm
really interested in Cake's custom data sources because I'm using many
REST API feeds in my application. Right now all of my model work is
done on a one-off
Hi everyone,
I am just seeing if anyone else has run into this problem before
attempting to report it as a bug.
Basically when I navigate to my site which uses the Request
Handler
component to switch to a blank layout for ajax requests
(automagically),
using the Google Chromium version 4
hi!
i'm working with language urls and everything works fine until
starting to use named params
i'd prepared this test and it fails when named params are added
http://bin.cakephp.org/saved/51531
try to make something with Router::connectNamed like
Router::connectNamed(false, array('default' => t
Hi everyone I am doing an gateway payment authorize.net sim method I
am getting an error on relay response url that seem an auth problem
that is not redirecting to mi site someone worked it please I hope
your help
Regards,
Jorge
--~--~-~--~~~---~--~~
You received
I really hope someone can help me. I've been struggling with this
problem for a long time and can't seem to figure it out.
I'm using Uploadify to handle file uploads and while it works well,
after the file is uploaded, the session is lost. I've read all about
restarting the session and passing th
Ok, this is what I have now.. and it works.. can someone just tell me
if it's the right way to do it?
Router::connect('/artist/*/album/*', array('controller' => 'albums',
'action' => 'view'));
On Oct 15, 6:20 pm, "gimperdan...@gmail.com"
wrote:
> I am learning about routes now, I used to write
I am learning about routes now, I used to write my own routes on mod
rewrites before i came to Cake, so I just need some small guidance
since I already have some knowledge...
Here's what I need to accomplish:
www.myswebsite.com/artist/ARTISTNAME/album/ALBUMNAME
On mod rewrite I just had to sub
If you have posts 1, 2, and 3 for example and you type in view/4 and there
is no 4 the page still renders but it has no data. How can you prevent this
?
I have
if ($this->Post->validPost($id) == true) {
which checks the DB for that id if found then do as normal
} else {
return them bac
Thanks a lot!
That's was the Problem. I had looked at it as well. But I have not
seen the difference.
Sorry.
Regards Uwe
On 15 Okt., 22:36, Miles J wrote:
> You need to edit all your plugin models and change the associations to
> use the correct plugin name.
>
> http://book.cakephp.org/view/1
Hi!
I need to pass a question mark in a named param value:
http://mysite/resources/search/a:0/q:art%3Fculo
%3F is the result of urlencode('?)
In the dispacher:
$_GET['url'] = resources/search/a:0/q:art?culo
But in the line 419 in router.php
function parse($url) {
...
#418 if (strpos($url, '
You were right. It didn't even cross my mind to look for a user written
helper. Found one, and it works! Thanks!
Marcelo Andrade wrote:
>
>
> On Tue, Oct 13, 2009 at 4:28 PM, hahmadi82 wrote:
>>
>> If anyone could help with this it would be much appreciated.
>
> I'm not a jQuery expert, b
You need to edit all your plugin models and change the associations to
use the correct plugin name.
http://book.cakephp.org/view/117/Plugin-Models
Basically the last example on that page.
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
Make sure your form paths are posting to the right action.
On Oct 15, 1:05 pm, Patrick Talmadge wrote:
> Once I added the call to the add method in the controller everything
> started working as expected. Does my register method end up calling
> the add method when saving? I ask because if the i
Yes thanks gwoo, thanks for your time and effort, you've made CakePHP
a better place.
--~--~-~--~~~---~--~~
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
That put me on the right path.
Thanks! Good Karma for you John!
--~--~-~--~~~---~--~~
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 this
Once I added the call to the add method in the controller everything
started working as expected. Does my register method end up calling
the add method when saving? I ask because if the input validation
fails the user is redirects from the register page to the add page.
I was planning to remove t
Dear All,
I've downloading GDChart 2.0 and extracted it. I make ./confure and make
but it seems the module can not be loaded due to following reason.
*
r...@ariza-laptop:/home/ariza/Desktop/gdchart-0.2.0/gdchart-0.2.0# make test
Build complete.
Don't forget to run 'make test'.
PHP Warning: PHP
yep you understood me thats i would like to try but i dont want to
restore the emails into database
is there anyway to do that
On Oct 15, 10:32 am, number9 wrote:
> Hi,
>
> I'm not sure if I have understood you correctly, but you want to share
> a post with somebody, and when you go to /posts/
Hi,
I'm not sure if I have understood you correctly, but you want to share
a post with somebody, and when you go to /posts/sharethis/22 it wont
let you fill in the form first?
Looking at your code, the E-mail will always send first because it
appears before the code for the form. If you wanted t
I have setup a cakephp installation so that the app, cake and webroot
folders have been moved from their default location. I have updated
the values in the /webroot/index.php and the application is working
fine, except that the webroot is not being recognised as the
public_html root.
Instead of i
Hello,
in Step 9 ist the Answer for Brian's ask. CmsAppModel is generate with
'CakeBuilder'. This class is emty. Below is the complete definition
provided. The model's were created for a plugin (CMS). The Plugin is
also generate with 'CakeBuilder' (cake bake plugin cms model)
class CmsAppModel
> Thanks Garett for all the good Cake. May you find joy in your life's
> new direction.
Yes, thanks Garrett for all the time and effort you put in - back when
I started with Cakephp, you were more than helpful (RdAuth + RdImage
FTW!).
All the best in the future.
j
--
jon bennett - www.jben.ne
Hello
I have a login procedure that requires more information than just the
username and password.
Controller: "employees"
Action: "login"
Databasefields needed for login: email, password, group (because it is
possible to have the same email for different groups).
Login URL: http://mydomain.co
As Brian asked, does your CmsFolder model inherit from AppModel or
something else?
Please show the code, not write it from "faulty" memory! :)
Also show the other model, if CmsFolder does not inherits from
AppModel!
Enjoy,
John
On Oct 15, 7:31 pm, Obelix wrote:
> someone has another idea ?
>
someone has another idea ?
On 14 Okt., 18:57, Obelix wrote:
> It's a model in a plugin. The name from the plugin is CMS. The class
> is defined as follows
>
> class CmsFolder extends CmsAppModel {
>
> On 14 Okt., 18:30, brian wrote:
>
> > How does the model class look? It should be:
>
> > clas
DESCRIBE is only used in debug mode. Once the site goes live the
DESCRIBE results are cached.
On Oct 15, 5:34 am, John Andersen wrote:
> If I remember correctly, just turn off debug, then the describe
> information will not be shown!
> Enjoy,
> John
>
> On Oct 15, 2:51 pm, SuMiT KuMaR wrote:
That would be great. I am using digitalspace.net as my host if anyone else
has had luck with getting Cake to run on them.
On Thu, Oct 15, 2009 at 6:43 AM, FrederickD wrote:
>
> Same exact thing happening to me on this thread:
>
> http://groups.google.com/group/cake-php/browse_thread/thread/6e5fa3
Thanks to those of you who actually acknowledged Garrett's efforts. I
can tell you that he very much appreciates all of it.
On Oct 14, 11:50 pm, "Larry E. Masters aka PhpNut"
wrote:
> Adam,
>
> Since being informed by gwoo that he was leaving the project a couple weeks
> ago, I have stepped bac
hi i'm creating mailto with cakephp email components to share the post
how do i do this with the form the have to fill out
form:
to:
comment:
then submit send that post id and the content of post this is i did
so far when i go to posts/sharethis/22 it sends email but wont let me
fill the form
argh gmail hotkeys irritate me...
continuing mail...
Im trying to leave as much up to the sql server as possible and reduce the
number of separate queries I run. I could probably accomplish all of these
reports with 100's of queries all handled in the controller but that would
get progressiv
Basically I'm just looking for a little finger pointing in the right
direction...
output of a submission - http://pastebin.com/f221f94c1
I'm trying to do some reporting based on a few related model fields
eg by school, by country, by category etc. each must also be grouped by all
the years too.
remember that this issue should be on demand not every period of time.
it is better to do it usin javascript/ajax
John Andersen said the truth... the last activity time... but the 5
minutes is something too long... heheh
I do like the way
On Oct 15, 12:22 am, DigitalDude wrote:
> Hey,
>
> that
I have read that a method to share the session is exactly using
memcache like session_handler.
And I have to share Cake session with other web application.
On 7 Ott, 16:44, jperras wrote:
> Memcache being used as a cache configuration and Sessions have pretty
> much nothing in common, unless yo
I have a user model, which hasMany user_profiles, each of which
belongsTo a user_data_type which belongs to a user_data_type_category.
So the array of data would look like this:
Array
(
[User] => Array
(
[id] => 1
[username] =>
[first_name] =>
Hey guys,
I'm trying to figure out how best to go about doing reports for my current
project.
It's a website where artists upload their work and then judges make rate +
comment etc. My query is in the reporting section.
The main model is the Submission model.
Submission belongsTo Student, Catego
Same exact thing happening to me on this thread:
http://groups.google.com/group/cake-php/browse_thread/thread/6e5fa3a941dce149.
Debug is set to '2'. In my case it is not Cake that is generating the
404, it is goDaddy.com the shared hosting server. Nothing in the Cake
logs. In the goDaddy.com logs
You can also check out phpshop or bakesale to see how you could create
shops with cakephp
On 15 Okt., 09:01, aravind raj wrote:
> am a new to cakephp
> can any one help to have shopping cart in my project...
>
> --
> Aravind "Think Global Act Local"
--~--~-~--~~~---~-
On Fri, Oct 16, 2009 at 12:19 AM, Martin Radosta wrote:
>
> Check this mark-story commit:
>
>
> http://code.cakephp.org/commits/view/332f6add6a97bdf738f8d1d71106834c82a46dc7#highlight
>
> specialy this line (710):
> if (in_array($options['type'], array('date', 'datetime'))) {
>
> was changed by th
Thankyou very much for your reply.
I hadn't done step number 3 in the config file (it was the default php
setting) - I don't have a dedicated server so the "cake" option was
what I wanted. As soon as I changed the core file, and updated the
cache the errors disappeared
I've done some reading and
As it turns out, just today I'm working on a shopping cart!
It's far from finished and rather specific for my needs, no payment or
anything, people just press "add to cart" in a list of products and
can check their cart in another view. There they get an ordernumber
and the account number and get
Check this mark-story commit:
http://code.cakephp.org/commits/view/332f6add6a97bdf738f8d1d71106834c82a46dc7#highlight
specialy this line (710):
if (in_array($options['type'], array('date', 'datetime'))) {
was changed by this line (710):
if ($options['type'] === 'date' || $options['type'] === 'd
Guys,
I have a problem. I tried to write one SQL query useing the CakePHP
style, but I failed. Can someone help?
Here are the tree models:
1. "Currency" with fields:
id
name
2. "Invoice" with fields
id
amount
currency_id (the FK)
... some other field
If I remember correctly, just turn off debug, then the describe
information will not be shown!
Enjoy,
John
On Oct 15, 2:51 pm, SuMiT KuMaR wrote:
> I have many models used in the admin. Even for the login screen it
> describes all the models/tables. I want to restrict the DESCRIBE
> statement
I have many models used in the admin. Even for the login screen it
describes all the models/tables. I want to restrict the DESCRIBE
statement on certain pages.
Can this be done?
Something like below:
[code]
(default) 38 queries took 58 ms Nr Query Error AffectedNum.
rows
> Please tell what the benefit of this is?
A better benefit might be to build a bridging component to the
hundreds of Joomla templates (without using the Joomla CMS codebase).
Other than the great looking templates, once I got involved with cake,
I didn't see much benefit to Joomla anymore. Very
Dear Lan
Always think like this on the client side
HTML/layout in for structuring
CSS is for styling/representing
Javascript is for behaving
cake comes with a default layout for html/php pages it is called
default.ctp and it is located in the cakefolder\cake\libs\view\layouts
the first thing you
Hai, Developers ,
What is the tentative availability date roadmap of CakePHP 1.3 ?
regards,
jiru
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cak
You can use the cake shell but as you are using Poedit, there's a very
easy solution only using Poedit.
- Open Poedit and choose File -> New catalog...
- Give some project infos "Project Info" Tab.
- Choose a language you want to translate to
- Choose the right "Charset" and "Source code charset"
Dear Kyte
sorry for the delay, I forgot!
Solution
just add this code in the beginning of the app\config\routes.php file
$singleton_router =& Router::getInstance();
if(!in_array('q',$singleton_router->named['default']))
$singleton_router->named['default'][]='q';
the problem is that
am a new to cakephp
can any one help to have shopping cart in my project...
--
Aravind "Think Global Act Local"
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to c
Sir i want add my own style to cake php.So please give an idea about
this.
--~--~-~--~~~---~--~~
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 unsubscri
how can a add plugins for paypal and shopping cart
--
Aravind "Think Global Act Local"
--~--~-~--~~~---~--~~
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
Add the following associations:
Item hasMany ItemOrder
ItemOrder hasMany Variation
ItemOrder belongsTo Item
Enjoy,
John
On Oct 15, 10:39 am, TimG wrote:
> Here is what I have:
>
> Models:
> Order (HABTM with Item)
> Item (HABTM with Order)
> ItemsOrder (join table)
> Variation (belongs to It
http://book.cakephp.org/view/44/CakePHP-Core-Configuration-Variables
For file based session you have 3 options:
1. Set permissions to /tmp folder that is default
2. Change php.ini to point to dir you have access instead of /tmp
3. Set Configure::write('Session.save', 'cake') and have them in cake
$persistModel ?
On Oct 14, 5:44 pm, "Dave Maharaj :: WidePixels.com"
wrote:
> Anyone seen this?
>
> The script tried to execute a method or access a property of an incomplete
> object. Please ensure that the class definition 'ValidationBehavior' of the
> object you are trying to operate on was l
maybe this can hlp
http://debuggable.com/posts/how-to-have-multiple-paginated-widgets-on-the-same-page-with-cakephp:48ad241e-b018-4532-a748-0ec74834cda3
On Oct 14, 1:30 pm, doze wrote:
> Hello,
>
> Is there a way to do multiple pagination with same model on a single
> view?
>
> I know about the
Dear Dave,
The logoutredirect deletes the session key of the auth component not
the other session keys...
Let the logout() method delete all the session keys that you create
since you have logged in
have a nice baking day
On Oct 15, 7:58 am, "Dave Maharaj :: WidePixels.com"
wrote:
> I have a lo
Set $this->disableCache() when referrer is login/logout?
On Oct 15, 11:58 am, "Dave Maharaj :: WidePixels.com"
wrote:
> I have a login module on the side of each page if not logged in.
> Problem is when a user logs in or out from the home page which is the
> $this->Auth->loginRedirect and $this-
You can pass fields names to find directly:
$clientes = $this->Cliente->find(
'list',
array(
'fields' => array('Cliente.codigo', 'Cliente.razaoSocial'),
'order' => array('Cliente.razaoSocial ASC')
)
);
On Oct 15, 3:41 am, "Leonardo \"Hackin\" Freire"
wrote:
> Hi dude
http://book.cakephp.org/view/625/link
On Oct 15, 4:13 am, hahmadi82 wrote:
> I'd like to know the same thing... How do you add something or remove
> something from a div via ajax
>
> Laburno wrote:
>
> > Hi all!
> > Could someone explain to a total noob like me, what is the best method
> > to si
Here is what I have:
Models:
Order (HABTM with Item)
Item (HABTM with Order)
ItemsOrder (join table)
Variation (belongs to ItemsOrder)
Here is my issue: I can get to the Variation model through the
ItemsOrder model if I start at the ItemsOrder model. But if I start at
Order and go to the ItemsOr
71 matches
Mail list logo