Re: Sort not working for pagination with custom joins.

2009-06-08 Thread Chez17
I should specify that the line: //'order' => $order, has been purposefully commented out, I was trying to do sort manually and gave up on that quick. So that is not the issue. On Jun 8, 2:12 pm, Chez17 wrote: > I am doing a search over multiple tables in the db and have cr

Sort not working for pagination with custom joins.

2009-06-08 Thread Chez17
I am doing a search over multiple tables in the db and have created a custom query for pagination using multiple joins. The query itself works fine and returns the right results. The issue is that sort isn't working on most of the columns. In fact, it only works on the fields that are part of the

Re: Search hasMany Associated Model

2009-04-22 Thread Chez17
Stu, I am trying to search over both Models and paginate the results. So I can't just do what you suggested. It needs to be one query. I have started working with joins but it's still not working. On Apr 22, 2:10 pm, Stu wrote: > What code are you trying right now? > > Seems like you're trying

Search hasMany Associated Model

2009-04-22 Thread Chez17
Hello all, I am trying to search from a modal and search a model that is associated to it. I have two models. User hasMany Friends Friend belongsTo User Basically, in the User model, if someone enters the search term 'Tom', I want to be able to search for Users named Tom and Friends that are nam

Need immediate help with searching and pagination over model associations. Will pay for your time.

2009-04-20 Thread Chez17
I have tried multiple posts and have searched all over the internet and I can't figure this one out. I imagine an expert could do this in less than an hour. I am happy to pay you for your time, please contact me at the email address above. Here is the issue, I have three models: Model1 HasMany M

Re: Search and Paginate hasMany relationship

2009-04-20 Thread Chez17
yodi, this hasn't been working for me. When I remove all search conditions, I get the containable behavior to work, but once I start putting in search conditions, it stops working. Here is the code I got working, all models have actsAs = 'containable' in them. I have taken your example and simpli

Re: Search and Paginate hasMany relationship

2009-04-18 Thread Chez17
Thanks for the response, I won't have a chance to test this until monday. I tried to understand the containable behavior but it just doesn't seem to be working for me. I'll keep at it. Thanks. On Apr 17, 9:44 pm, yodi wrote: > Oopss, i'm forgot Registration, here : > > function paginateSearch($i

Search and Paginate hasMany relationship

2009-04-17 Thread Chez17
I am trying to create a search function and paginate the results. For all the standard fields, this is an easy task. I have one situation that is causing me a ton of headaches and any help you can give is most appreciated. Here is the setup: Registrations - hasMany RegistrationCodes Registration

Need high-level advice on how to implement cross Model csv exporter

2009-04-15 Thread Chez17
Hello all, I have a client that wants to be able to export any results he sees on screen to a csv file. This will be used for different models and will need to work on large queries. I was wondering if anyone would be willing to share their thoughts on the best 'cake' way to do this. I'm asking f

Re: Multiple User Levels Without ACL

2009-03-13 Thread Chez17
i, Mar 13, 2009 at 2:34 PM, Chez17 wrote: > > > I am trying to code a system with 3 different user levels, admin, > > technicians, and clients. They all have logins and will use the users > > controller. My question is a philosophical one, not a technical one. > > So I h

Multiple User Levels Without ACL

2009-03-13 Thread Chez17
I am trying to code a system with 3 different user levels, admin, technicians, and clients. They all have logins and will use the users controller. My question is a philosophical one, not a technical one. So I have the technicians and clients, for the most part they are similar, but they will be d

Auth: different redirects based on User level

2009-03-03 Thread Chez17
I am having issues setting up different redirects for a logged in user. Basically, there are two user levels, ADMIN and USER. If a USER logs in I want to redirect them to the a different page than an admin. I have tried using switch statements and tried using the normal $this- >redirect function b

Using Scriptaculous Effects When Adding Content To Div

2008-10-19 Thread Chez17
I have an ajax form that is submitting new content to the bottom of a div. What I want to try and do is get an 'appear' effect to happen on the new content once it's submitted. I can't get this effect to work. I can't find any good resources on this and I can't find any old posts in this group tha

Re: SQL WHERE statement working with "created" field

2008-10-15 Thread Chez17
BLAM! I successfully helped someone on this newsgroup! Sorry about that, first time. Won't happen again. On Oct 15, 4:17 pm, "Daehee Park" <[EMAIL PROTECTED]> wrote: > Perfect, thanks so much! > > On Wed, Oct 15, 2008 at 3:54 PM, Chez17 <[EMAIL PROTECTED]> wr

Re: SQL WHERE statement working with "created" field

2008-10-15 Thread Chez17
I'm no expert but I think I maybe able to help. So lets assume you have a php variable $lastWeek that has the date you want (7 days ago). You create a find statement like this: $result = $this->YourController->find('all', array('conditions' => array('Table.created >' => "$lastWeek"))); Make sure

Re: Question on the best way to proceed and stay true to MVC/CakePHP philosophy

2008-10-15 Thread Chez17
To specify, here is the error: Fatal error: Class 'CommandParser' not found in /home/dave/www/ goontastic/app/controllers/channels_controller.php on line 61 So it's not seeing the 'class' but I am including it in the components array. This for 1.2 RC3. On Oct 15

Re: Question on the best way to proceed and stay true to MVC/CakePHP philosophy

2008-10-15 Thread Chez17
I am having some issues getting what you said to work. It must be a syntactical problem, I can't get something like CommandParser::processCommand() to return anything. Here is the code: /controllers/components/command_parser.php /controllers/channels_controller.php var $components = array('R

Re: Question on the best way to proceed and stay true to MVC/CakePHP philosophy

2008-10-14 Thread Chez17
Thanks! This is amazing advice. I am such a beginner and this was fantastic. The array idea is so simple and brilliant, way easier. I will try to look into doing what you suggest. Thanks again. On Oct 14, 9:01 pm, ORCC <[EMAIL PROTECTED]> wrote: > I think first that all you have to separate the "

Question on the best way to proceed and stay true to MVC/CakePHP philosophy

2008-10-14 Thread Chez17
So I have an ajax chat application that I am working on. If a user types a comment the starts with '/' it sends the comment to the 'command' function in my controller (as opposed to a normal 'add' function for chats). For example if the user types "/help" it will list all the possible commands. No

Re: Javascript causing Ajax form to submit, but not all ajaxy like I want

2008-10-08 Thread Chez17
ED]> wrote: > http://book.cakephp.org/view/208/AJAX > > And I quote: > "The AjaxHelper utilizes the ever-popular Prototype and > script.aculo.us libraries for Ajax operations and client side > effects." > > On Oct 8, 7:40 pm, Chez17 <[EMAIL PROTECTED]> wrot

Re: Javascript causing Ajax form to submit, but not all ajaxy like I want

2008-10-08 Thread Chez17
In case anyone wants to know. I did get this to work but I had to use the prototype library and javascript. I couldn't get it working within cakes own features. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP

Re: Ajax Form "complete" => not working with functions

2008-10-07 Thread Chez17
gt;         'url' => array('controller' => 'comments', 'action' =>'add'), >         'update' => 'pureGenius', >         'complete' => 'testCall();')); > ?> > .

Ajax Form "complete" => not working with functions

2008-10-06 Thread Chez17
The "complete" option works fine if I put the javascript directly into the array. However if I try to put it in a function in the array it doesn't work. Take the following example: form('addComment', 'post', array( 'model' => 'Comment', 'url' => array('controller' => 'comments', '

Javascript causing Ajax form to submit, but not all ajaxy like I want

2008-10-05 Thread Chez17
I didn't know how else to describe it. Here's the code: form('addComment', 'post', array( 'model' => 'Comment', 'url' => array('controller' => 'comments', 'action' =>'add'), 'update' => 'pureGenius')); //echo $form->input('comment', array('rows' => '3')); ?> var flag

How to change the value of a textbox

2008-10-04 Thread Chez17
I have div thats basically a comment section and it's getting updated via an ajax form call. I can't seem to find a way to empty the comment box in the form that's being submitted. So what's happening once the user clicks submit the div is being updated with the comment but the textbox still has t

Re: Auth login redirect unreliable?

2008-07-06 Thread Chez17
Using Eric's post, I created a very simple way to get the Auth component to redirect to the referring page no matter what. I think its userful: Auth->autoRedirect = false; } function login() { $this->redirect($_SERVER['HTTP_REFERER']); } } On Jul 2, 1:56 pm, Rich <[EMA

Re: Something is up with the documentation?

2008-05-27 Thread Chez17
For me, the bakery isn't working at all. I have had constant issues with the manual. Anyone know whats going on? Hopefully its because they are so busy preparing 1.2 that they have no time to worry about a functioning website. On May 26, 3:25 pm, Mike van Lammeren <[EMAIL PROTECTED]> wrote: > The

1.2 Cache issues

2008-05-27 Thread Chez17
I am trying to recode my blog as a project to learn cakePHP, and the only thing not working now is the cache. I have turned it off completely using Configure::write('Cache.disable', true); and I have even inserted in the code and nothing is working. I have set up FireFox to not cache anything so

Re: Using CakePHP to update a wordpress rss feed

2008-05-22 Thread Chez17
Thats what I'm getting at. I want to make sure when I switch my site over from wordpress to CakePHP, I want all the readers who subscribe to my current wordpress rss feed to be automatically subscribed to the new CakePHP generated rss feed. I was wondering how I would do that. When you say 'dupli

Re: Using CakePHP to update a wordpress rss feed

2008-05-22 Thread Chez17
I am using they dynamically generated feed. Does that mean there is no way to get the new site to work with the old rss feed? > Are you using the dynamically generated WordPress RSS feed or > something like FeedBurner? If it's dynamically generated, you can't > "add" to it, but you can easily cre

Using CakePHP to update a wordpress rss feed

2008-05-22 Thread Chez17
As a project to learn CakePHP, I have been recreating my wordpress blog. My issue now is that I want to keep the same rss feed that was set up by wordpress and have my new site update that. I have no idea how to get started on this, I was hoping for a push in the right direction. Thanks for your

Re: save() keeps creating new records, not updating old ones

2008-04-27 Thread Chez17
> 1) Why not just use $this->Profile->Info->id = $yourID; > > 2) Why not just save the Profile Model, the Associatives Models should > save with it if the data is present in the correct format. > > Cheers, > mbavio > > On Apr 25, 5:55 pm, Chez17 <[EMAIL PROTECTE

Re: save() keeps creating new records, not updating old ones

2008-04-25 Thread Chez17
So I finally figured this out. Here is the solution: Above this call in the if statement: $this->Profile->Info->save($this->data) you need to enter: $this->Profile->Info->setId( $temp['Info']['id'] ); Thanks for both your help and time. --~--~-~--~~~---~--~~ Yo

Re: save() keeps creating new records, not updating old ones

2008-04-24 Thread Chez17
t('Info.id', array('type' => 'hidden')); >     echo $form->input('Profile.id', array('type' => 'hidden')); > > May be only one of them, may be both. > > Sure this is not the Cake-Style; but I share what I've don

save() keeps creating new records, not updating old ones

2008-04-24 Thread Chez17
I am creating a basic facebook type site for my first cake project, just to learn it. I am having issues getting the save funciton to work with my model relationships. Its very simple right now, the modle Profile hasOne Info. The Info model belongsTo Profile and stores all the contact information.

Re: Making a field Unique

2008-04-21 Thread Chez17
I have solved the first part of my question, but it seems that nobody can answer my second question. How do I access that 'Profile must be unique' message in my view? I can't find how to do it anywhere. --~--~-~--~~~---~--~~ You received this message because you are

Re: Making a field Unique

2008-04-20 Thread Chez17
That didn't work, it requires two arguements. --~--~-~--~~~---~--~~ 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 group, send email

Re: Making a field Unique

2008-04-20 Thread Chez17
Thanks for all your help. I have one last question. So now that I have my validate working, how do I print the error message that I specify in the function? Simon said that I don't need to put anything in the view, but then says be sure to use the helper, can someone explain what that means? How d

Re: Making a field Unique

2008-04-20 Thread Chez17
Does the findBy() function work for any field? If I have a field like first_name how do you do the findBy() function? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email

Re: Making a field Unique

2008-04-20 Thread Chez17
b logica, You stop just short of the problem I need to solve. I dont know how to write the DuplicateProfile function. Thats the find() statement I need help with. I know cakes has the findByUsername function, I was asking how to write something like that for the profile field. Josh, I tried doi

Making a field Unique

2008-04-20 Thread Chez17
I am having issues making sure that a field is unique. I am beginner so please go easy on me. Right now, I am trying to create a simple login system where the user name name and profile name have to be unique. I have been cutting and pasting some stuff together and I can't seem to get this to work

Begginer Session Help

2008-04-19 Thread Chez17
I am having problems accessing the session data. I am writing the session data like this: $this->Session->write('User', $someone['User']); But since user is an array, I don't know how to access the data in user. I can't seem to get read to do it. I have looked at the cakephp manual and api, i do

Re: CSS Acting Very Bizarre

2008-04-15 Thread Chez17
The problem is fixed now. I checked what was going on in Firebug and it showed that the CSS I entered was not even in the file. I must have been using a temporary file somehow or what I did before got saved to different file. I have no idea what happened. Its working now. Thanks for you help and t

CSS Acting Very Bizarre

2008-04-15 Thread Chez17
I am a CakePHP beginner and I am having some wierd issues with getting a CSS file working. I am linking to the file by using the html helper css('site'); ?> now heres whats weird. I know its linking because it is getting the background and font colors I specified but it doesn't get most other th