Re: Forms and Descriptions

2010-06-10 Thread Jeremy Burns | Class Outfit
User the 'after' option and then apply css: echo $this->Form->input( 'field_name', array( 'after' => 'Your description...' ) ); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.cla

Re: Login and Registration form on same page/view

2010-06-10 Thread Jeremy Burns | Class Outfit
You set the 'action' of each form to as appropriate: http://book.cakephp.org/view/1384/Creating-Forms Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 10 Jun 2010, at 14:58, Andrei Mita wrote: > Hello, > > How can I set up two for

Re: Need advice for storing copies of data

2010-06-10 Thread Jeremy Burns | Class Outfit
es per customer and record the address_id the order is sent to. Your challenge will be making the user interface easy; are you updating this address or changing it - that language could get confusing. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 10 Jun

Re: Installing another application inside my CakePHP 1.3 app

2010-06-10 Thread Jeremy Burns | Class Outfit
The way I have done this in the past is to put the forum folder inside webroot and set up a subdomain, pointing the subdomain at the webroot/forum folder. It works fine (I have done it with phpBB3). Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 10 Jun

Re: can i use html5 in cakephp?

2010-06-09 Thread Jeremy Burns
I want to adopt HTML 5 - but I worry about backwards compatibility - again. Anyone got any good resources on safe degredation? Jeremy Burns jeremybu...@me.com On 10 Jun 2010, at 06:04, Andy Dirnberger wrote: > According to the W3C, they expect to reach the recommendation > milestone for

Re: problem in auth component when i was creating a login controller.

2010-06-08 Thread Jeremy Burns
t; [CORE/cake/libs/controller/components/auth.php, line 525] Jeremy Burns jeremybu...@me.com On 8 Jun 2010, at 12:16, Narendra Padala wrote: > Hi i am new to cake php, when i am creating a login authentication using app > controller the following error was showed so please help me out.

Re: How to create login page using app_controller.php

2010-06-08 Thread Jeremy Burns
I think this piece of the guide will help: http://book.cakephp.org/view/1265/AuthComponent-Variables#authorize-1275 Try adding: $this->Auth->authorize = 'controller'; to your app_controller's beforeFilter. Jeremy Burns jeremybu...@me.com On 8 Jun 2010, at 07:50, Narendra

Re: How to create login page using app_controller.php

2010-06-07 Thread Jeremy Burns
What errors are you getting? Jeremy Burns jeremybu...@me.com On 8 Jun 2010, at 07:28, Narendra Padala wrote: > Hi am new to cakephp, i am using postgress sql database this is an existing > database here i am not having permissions to change any thing in database. > but i have to w

Re: Auth Component and user information.

2010-06-07 Thread Jeremy Burns
I think the point is that as part of your log in process you scrape information from your associated model and add it to the User array. You could also do an update if the associated model data was changed, I guess. Jeremy Burns jeremybu...@me.com On 7 Jun 2010, at 19:33, saidbakr wrote: >

Re: Dynamic Navigation (Menu and submenu)

2010-06-06 Thread Jeremy Burns
That's my article. It needs updating as I have improved it substantially since writing it. It also needs some code to download. I can't commit to a timeframe, but I will work on it. Jeremy Burns jeremybu...@me.com On 7 Jun 2010, at 05:06, saavedrajj wrote: > I'm tired of

Re: Query Results, Empty Array

2010-06-04 Thread Jeremy Burns
@calvin: Not sure I understand you. die(debug($page)); will return the contents of $page and then stop the code. Works every time. Jeremy Burns jeremybu...@me.com On 4 Jun 2010, at 16:24, calvin wrote: > ^I'm pretty sure that debug() doesn't have a return value. So I > usually

Re: Query Results, Empty Array

2010-06-04 Thread Jeremy Burns
ng it. Then, immediately after you run the query ($page = $this->find) try this: die(debug($page)); What does that show? Jeremy Burns jeremybu...@me.com On 4 Jun 2010, at 14:39, DragonFlyEye wrote: > I've searched the group a bit and haven't found anything that seems to >

Re: "Message" Model with Sender and Recipient from User-Table

2010-06-04 Thread Jeremy Burns
'className' => 'User', 'foreignKey' => 'recipient_id' ) ); See here for more details: http://book.cakephp.org/view/1046/Multiple-relations-to-the-same-model Jeremy Burns jeremybu...@me.com (Skype) +44 208 123 3822 (jerem

Re: "Message" Model with Sender and Recipient from User-Table

2010-06-04 Thread Jeremy Burns
r', 'foreignKey' => 'recipient', 'conditions' => 'User.id = Message.recipient', 'fields' => '', 'order' => '' ) );

Re: Hundreds of empty rows being created

2010-06-03 Thread Jeremy Burns
What happens if, instead, you do this: if (! $this->Model->save($data)): die(debug($this->Model->validationErrors); endif; And should it really be $this->data, rather than $data? Jeremy Burns jeremybu...@me.com On 3 Jun 2010, at 13:24, Kareem Sabri wrote: > Hello,

Re: how to set session variable after render?

2010-06-03 Thread Jeremy Burns
variable is not equal to 1, so animations doesn't happen. Jeremy Burns jeremybu...@me.com On 3 Jun 2010, at 12:44, Anna P wrote: > Hello. > > Just like in topic: how can I set session variable after page render? > > The issue is: on first visit on home page, I want to display

Re: $session->flash(); issue

2010-06-03 Thread Jeremy Burns
What happens if you: die(debug($this->session->read('Message.auth'))); ...just before you set it? If that is an array, then that is what will go into the flash message. Try this instead: $session->flash('auth'); Jeremy Burns jeremybu...@me.com On 3 Jun 2010, a

Re: $session->flash(); issue

2010-06-03 Thread Jeremy Burns
Where are you setting the message with $session->setFlash();? Jeremy Burns jeremybu...@me.com On 3 Jun 2010, at 09:23, Zahidur Rahman wrote: > Hi i am still getting Array as output > > On 6/3/10, Jeremy Burns wrote: >> You din't need to do that. Just do $session-&g

Re: Login - Header location Error

2010-06-03 Thread Jeremy Burns
Really? The error message is clearly saying you haven't. Check again in app/config/core.php. Jeremy Burns jeremybu...@me.com On 3 Jun 2010, at 08:51, Davor Ilic wrote: > Oh i see but i do not understand why i allways getting this debugging for > chaning it becaus i had change

Re: Using Like operator in condition

2010-06-03 Thread Jeremy Burns
http://book.cakephp.org/view/1030/Complex-Find-Conditions Jeremy Burns jeremybu...@me.com On 3 Jun 2010, at 08:04, Ambika Kulkarni wrote: > Hi all, > > In my controller I have the following code snippet. This is used for > searching a product name in campaigns tbl. >

Re: $session->flash(); issue

2010-06-02 Thread Jeremy Burns
You din't need to do that. Just do $session->flash(); - if there is a message set, it will display, else it won't. Jeremy Burns jeremybu...@me.com On 3 Jun 2010, at 07:40, Zahidur Rahman wrote: > Hi experts > I am facing a problem for showing flash message in my view file.

Re: One to Many question

2010-06-02 Thread Jeremy Burns
Graham's reply was far more comprehensive than mine and I'd go with it. I use containable as a matter of course. Jeremy Burns jeremybu...@me.com On 3 Jun 2010, at 06:01, Roland Pish wrote: > Thanks for your reply Jeremy. > > I was avoiding the conditions array because I th

Re: One to Many question

2010-06-02 Thread Jeremy Burns
I'd try this: > $foreignSchools = $this->Student->ForeignSchool->find('all', > array('conditions' => array('ForeignSchool.student_id' => 2))); (hope the number of brackets is right...) Jeremy Burns jeremybu...@me.com On 3 Jun 2010, at

Re: Login - Header location Error

2010-06-02 Thread Jeremy Burns
It looks like you are echoing or debugging something to the screen, which is then getting in the way of the headers. Jeremy Burns jeremybu...@me.com On 2 Jun 2010, at 16:37, Davor Ilic wrote: > Hi, > > my problem is the header location func when i redirect after login i get this

Re: tricky list re-ordering problem

2010-06-01 Thread Jeremy Burns
f the document If so, wouldn't a 'sort_order' column in the documents table fix this? If so, the order becomes (i) section.name (ii) document.sort_order. Have I missed the point? Jeremy Burns jeremybu...@me.com On 2 Jun 2010, at 01:23, cricket wrote: > Cake 1.2.7 > > I&#

Re: 1.2.7, Application and plugin intercommunication, looking for ideas, comments, etc.

2010-06-01 Thread Jeremy Burns
ed to make these items more integrated with your application, which will reduce your challenge. Jeremy Burns jeremybu...@me.com On 1 Jun 2010, at 06:44, John Andersen wrote: > 2nd and last bump! Would very much like some comments :) > > Check out the new CakePHP Questions site http://

Re: Paypal buy now/subscription response

2010-06-01 Thread Jeremy Burns
d the developer section on the PayPal site - they even have sample code. Jeremy Burns jeremybu...@me.com On 1 Jun 2010, at 12:44, barbi wrote: > Hi, > > NOT related to CAKEPHP, sorry about that but I thought this question > (and also answers) will help this community. > > I ha

Re: Recursive some only some associations?

2010-05-29 Thread Jeremy Burns
Here is your silver bullet: http://book.cakephp.org/view/1323/Containable Jeremy Burns jeremybu...@me.com On 29 May 2010, at 13:07, Antony wrote: > Hi all, > > I have my models setup so: Person Item Images > > I want to be able to display a list of People and

Re: HABTM Question.

2010-05-28 Thread Jeremy Burns
It isn't just restricted to HABTM, it's a standard thing. But here's a page that refers specifically to HABTM: http://book.cakephp.org/view/1390/Automagic-Form-Elements Jeremy Burns jeremybu...@me.com On 29 May 2010, at 06:10, Roland Pish wrote: > It worked!! > Fin

Re: HABTM Question.

2010-05-28 Thread Jeremy Burns
Ah. Try this: $funnyTags = $this->Post->FunnyTag->find('list',array('fields'=>array('id','name'))); If that doesn't fix it, try this as well: echo $form->input('FunnyTag'); Jeremy Burns jeremybu...@me.com On 29 Ma

Re: HABTM Question.

2010-05-28 Thread Jeremy Burns
>FunnyTag->find('list',array('fields'=>array('id','name'))); ...and change this: $this->set(compact('tags')); ...to this: $this->set(compact('funny_tags')); Does that resolve it? Jeremy Burns jeremybu...@me.com On 29 May 201

Re: cake beginners

2010-05-28 Thread Jeremy Burns
ted to the index view (although you can change that) If the save fails, it goes back to the add view showing validation errors Is this what is happening for you? Jeremy Burns jeremybu...@me.com On 28 May 2010, at 12:39, vikasphplernter wrote: > hello All, > I am very new in cake php and I

Re: Using one model from another

2010-05-28 Thread Jeremy Burns
p the associations correctly ($belongsTo, $hasMany etc) you can access the model without doing loadModel. Don't forget that you can daisy chain models too: $this->RelatedModel->SisterModel->FatherModel->BrotherModel->function(); Jeremy Burns jeremybu...@me.com On 28 May

CakePHP and WordPress

2010-05-27 Thread Jeremy Burns
I know this has been touched on a few times, but I have an issue I can't resolve or find a working answer to. I have installed WordPress in /app/webroot/blog Following various bits of advice I have added these lines to the .htaccess file in Cake's root: RedirectMatch temp ^/blog/wp-admin

Re: Database representation of meta data tables

2010-05-27 Thread Jeremy Burns
Before answering can I clarify. Do you mean (for example): table: users table: user_profiles ...where each user has a row in the user_profiles table? Jeremy Burns jeremybu...@me.com On 27 May 2010, at 14:11, Radyon wrote: > Hey, > > I've just started using cake and was wonderi

Re: Avoiding $uses but binding not giving a result?

2010-05-27 Thread Jeremy Burns
Have you set recursive anywhere? http://book.cakephp.org/view/439/recursive Jeremy Burns jeremybu...@me.com On 27 May 2010, at 10:16, Shaz wrote: > Thanks all - I went back to the models and checked the belongsto/ > hasmany declerations, some plurals where they shouldn't be

Re: Problem with database cascade relationships.

2010-05-26 Thread Jeremy Burns
All of your table and field names should be lower case. What is your full find statement? Can you post it all, not just a small piece. Jeremy Burns jeremybu...@me.com On 27 May 2010, at 00:22, 朝の木 wrote: > I have three models (with controllers): > - Product: Id, Title, Type_id > -

Re: Join table question

2010-05-26 Thread Jeremy Burns
This ought to be fine - are you having problems? http://book.cakephp.org/view/1044/hasAndBelongsToMany-HABTM Jeremy Burns jeremybu...@me.com On 26 May 2010, at 22:21, Roland Pish wrote: > Hello. > I have two tables with a many-to-many relationship between them: > practiti

Re: Avoiding $uses but binding not giving a result?

2010-05-26 Thread Jeremy Burns
You have added 'S's to your model names. Try: $this->Article->Comment->CommentRank->read() Jeremy Burns jeremybu...@me.com On 26 May 2010, at 18:34, Shaz wrote: > I have: > > Article [hasmany] Comment [hasmany] CommentRank > CommentRank [belongsto] Comment

Re: isset function for different buttons in one page.

2010-05-26 Thread Jeremy Burns
Check $this->params['form'] - the name of the button you click should be in there. Jeremy Burns jeremybu...@me.com On 26 May 2010, at 12:36, Master Ram wrote: > hi.. to all > > > i have 8 submit button in one form. > > this is the example: > > >

Re: Ajax problem ???

2010-05-24 Thread Jeremy Burns
Yes. Jeremy Burns jeremybu...@me.com On 25 May 2010, at 05:49, Ed Propsner wrote: > @Jeremy: Are you on 1.3 stable ? > > > On Tue, May 25, 2010 at 12:40 AM, Jeremy Burns wrote: > Interesting Ed - I find the display of error messages a bit hap-hazard too > and thought

Re: Ajax problem ???

2010-05-24 Thread Jeremy Burns
Interesting Ed - I find the display of error messages a bit hap-hazard too and thought it was just me. I can't add anything to this post yet, but I am watching with interest. Jeremy Burns jeremybu...@me.com On 25 May 2010, at 04:18, Ed Propsner wrote: > I might be going out on a l

Re: puzzle over activity

2010-05-24 Thread Jeremy Burns
Do you have debug set to 2? If it's at 0 you often won't see an error, just a blank page. Jeremy Burns jeremybu...@me.com On 24 May 2010, at 09:12, Iqbal Santyaswardan wrote: > Hi there, > > First of all, sorry about the subject line, I couldn't think of one >

Re: Simple Acl controlled Application

2010-05-21 Thread Jeremy Burns
Does your computer allow you do any sort of find across folders and files? Mine does (perhaps it's more modern than yours). I found your missing file! /cake/console/templates/skel/config/schema/db_acl.sql Jeremy Burns jeremybu...@me.com On 21 May 2010, at 21:56, Jonathan wrote: >

Re: cakephp on wamp

2010-05-21 Thread Jeremy Burns
http://book.cakephp.org/view/912/Installation Jeremy Burns jeremybu...@me.com On 21 May 2010, at 12:02, Amit wrote: > Hi > > i want to install cakephp on wamp, but i don't know where should i > put this downloaded cakephp folder, i has renamed it as myApp. > &g

Re: Transactions in Cakephp 1.3

2010-05-21 Thread Jeremy Burns
http://book.cakephp.org/view/1633/Transactions Make sure your table suports transaction - e.g. InnoDB. Jeremy Burns jeremybu...@me.com On 21 May 2010, at 08:56, pablopedrosa wrote: > Hello, i have a problem i don´t know how to resolve it. > Is there any posibility when using transaction

Re: Problem with Session->setFlash

2010-05-21 Thread Jeremy Burns
What error are you getting? Can you post the code where you call it? Have you included both the Session helper and component in your controller (or app_controller)? Jeremy Burns jeremybu...@me.com On 21 May 2010, at 10:48, sami_bk wrote: > Hi Jeremy, > > Thanks for your reply. >

Re: Problem with Session->setFlash

2010-05-20 Thread Jeremy Burns
Seems like overkill to me. Just use $this->Session->setFlash('Here is my message'); Then do echo $this->Session->flash(); - this not only displays your message but also clears it out of the cache. Jeremy Burns jeremybu...@me.com On 20 May 2010, at 18:16, sami_bk wrote

Re: How create model in cakephp [Naming conventions Problem]

2010-05-20 Thread Jeremy Burns
It's TestStore - I just posted a correction. Jeremy Burns jeremybu...@me.com On 20 May 2010, at 14:14, Narendra Padala wrote: > hi here model class name > > Table test_stores: test_store.php, model class TestStores > > > "TestStores" or TestStore. i

Re: How create model in cakephp [Naming conventions Problem]

2010-05-20 Thread Jeremy Burns
Correction: model class: TestStore Jeremy Burns jeremybu...@me.com On 20 May 2010, at 14:02, Jeremy Burns wrote: > Model conventions: http://book.cakephp.org/view/901/CakePHP-Conventions > > But in case you can't be bothered to read it, let me spell it out for you. > >

Re: How create model in cakephp [Naming conventions Problem]

2010-05-20 Thread Jeremy Burns
gular, camel cased. So your models are: Table stores: store.php, model class Store Table test_stores: test_store.php, model class TestStores Jeremy Burns jeremybu...@me.com (Skype) +44 208 123 3822 (jeremy_burns) (m) +44 7973 481949 (h) +44 208 530 7573 On 20 May 2010, at 13:54, Narendra Padala

Re: Find Question - field()

2010-05-19 Thread Jeremy Burns
code: $email = $this->User->field( 'email_address', array('id' => $this->data['Friend']['friend_id']) ); I think you had two error in your code. I have replaced User-> with $this->User-> and there was a '>' mis

Re: Find Question - field()

2010-05-19 Thread Jeremy Burns
e you need from the array and return a single value. Jeremy Burns jeremybu...@me.com On 20 May 2010, at 03:17, bradmaxs wrote: > I want to send an email with the email component. No problem there. > > However, I don't want it to be a hidden field in the form so I thought

Re: How write where condition in cakephp

2010-05-19 Thread Jeremy Burns
http://book.cakephp.org/view/1030/Complex-Find-Conditions Jeremy Burns jeremybu...@me.com On 19 May 2010, at 14:06, Narendra Padala wrote: > Hi ...All I am new to cake php, I need to write where conditions like this > please any one can help me out > > >

Re: How to display the joins table data in cake php

2010-05-19 Thread Jeremy Burns
Type this: die(debug($storeDivisions)); ...just before you try to access it, and you'll see its shape. Jeremy Burns jeremybu...@me.com On 19 May 2010, at 13:54, Narendra Padala wrote: > Hi...All ! > i am new to cake php i am writting query like this , i am using left join i

Re: Can Any one Helllp me?

2010-05-19 Thread Jeremy Burns
http://book.cakephp.org/view/1017/Retrieving-Your-Data Jeremy Burns jeremybu...@me.com On 19 May 2010, at 11:28, Dilip Godhani wrote: > Hello > > How i use Order by with and condition can any one give me one good example?? > > Thanks..! > > > -- > Dilip Godh

Re: Update problem

2010-05-18 Thread Jeremy Burns
Before you give up, try this: if (!$this->User->save()): debug($this->User->validationErrors); die(debug($this->User)); endif; ...and see what it produces. Jeremy Burns jeremybu...@me.com On 19 May 2010, at 05:25, Ed Propsner wrote: > NOT going to stress I

Re: Update problem

2010-05-18 Thread Jeremy Burns
So are you good to go now? Jeremy Burns jeremybu...@me.com On 19 May 2010, at 05:16, Ed Propsner wrote: > Thanks Jeremy, I caught that one myself a little while ago in the manual > query, I should have updated this post. > > My original concern was why I couldn't get this

Re: Save select box value not ID

2010-05-18 Thread Jeremy Burns
#x27;Cheeries' by mistake. If you are new to Cake and these concepts, I'd recommend you read the following parts of the online guide. In particular, look at the section on Baking. This is invaluable stuff. Al you do is build your database, point Cake at it and it will build a simple a

Re: How to join 2 tables in the controller

2010-05-18 Thread Jeremy Burns
I would start by reading this part of the online guide. Setting up models is key to just about everything you do in Cake, so simply finding out how to join two tables will only move you on to your next problem. Jeremy Burns jeremybu...@me.com On 18 May 2010, at 12:29, cakephpBbsr wrote

Re: Update problem

2010-05-18 Thread Jeremy Burns
users SET approved = 1, last_login = '2010-05-18 16:54', activation_code = '' WHERE id = 1937 Jeremy Burns jeremybu...@me.com On 19 May 2010, at 01:07, Ed Propsner wrote: > I'm really not sure what the deal is here. This works for an update: > > [code] > &g

Re: Problems with URLs causing flash too break

2010-05-18 Thread Jeremy Burns
Seven... Jeremy Burns jeremybu...@me.com On 18 May 2010, at 01:21, Cycling_Joe wrote: > Can anyone guide me to what I am doing wrong. > If the www is omitted in my url's it causes my flash files to break. > If I go to http://www.mysite.com everything is fine. > If I go to

Re: Problems with URLs causing flash too break

2010-05-18 Thread Jeremy Burns
Six posts in an hour? Jeremy Burns jeremybu...@me.com On 18 May 2010, at 01:21, Cycling_Joe wrote: > Can anyone guide me to what I am doing wrong. > If the www is omitted in my url's it causes my flash files to break. > If I go to http://www.mysite.com everything is fine. >

Re: different buttons in one form

2010-05-18 Thread Jeremy Burns
It was you who originally taught me that trick ;-) Jeremy Burns jeremybu...@me.com On 18 May 2010, at 13:55, John Andersen wrote: > Good for you Jeremy, you just answered before I did :) > Enjoy, > John > > On May 18, 3:52 pm, Jeremy Burns wrote: >> Give each butto

Re: different buttons in one form

2010-05-18 Thread Jeremy Burns
s. I'd use links in the /controller/action/parameter manner so that everything happens just as Cake expects it. Standards and conventions. Jeremy Burns jeremybu...@me.com On 18 May 2010, at 13:43, Master Ram wrote: > hi.. am an new to cakePHP, > > i have 3 buttons in one form. with

Re: render a different element for different user groups

2010-05-18 Thread Jeremy Burns
There might be a smart way, but if not, you could get the name of the group the person belongs to and create a variable such as $groupName + '_leftbar', then echo $this->element($elementName); Jeremy Burns jeremybu...@me.com On 18 May 2010, at 13:10, Ernesto wrote: > Hell

Re: Bind more views together

2010-05-18 Thread Jeremy Burns
What do you mean by 'bind'? Do you mean that you want to display more than one view at the same time? If so, you should look at elements: http://book.cakephp.org/view/1081/Elements Jeremy Burns jeremybu...@me.com On 18 May 2010, at 10:28, Davor Ilic wrote: > Hi, > >

Re: $this->Email

2010-05-17 Thread Jeremy Burns
Ed - these are comments added by the debug toolbar. Do you have it installed, and does it go away when debug is set to 0? Jeremy Burns jeremybu...@me.com On 18 May 2010, at 00:35, Ed Propsner wrote: > What am I overlooking with $this->Email? > > Every message that gets sen

Re: User errors and fat model, skinny controller

2010-05-17 Thread Jeremy Burns
to do. Jeremy Burns jeremybu...@me.com On 18 May 2010, at 00:27, calvin wrote: > So since I've started trying to implement the fat model, skinny > controller MVC pattern, I've continuously run into one issue--the > problem of dealing with user errors. > > Fat model, s

Re: Can any One Hellp To imaplement ACL

2010-05-17 Thread Jeremy Burns
http://book.cakephp.org/view/1543/Simple-Acl-controlled-Application Jeremy Burns jeremybu...@me.com On 17 May 2010, at 13:32, Dilip Godhani wrote: > Hello Sirr... > Can Any one give me good and working tutorial of ACL > send me plz > > Thanks Bye bye > > -- > Dil

Re: search query problem...?

2010-05-17 Thread Jeremy Burns
http://book.cakephp.org/view/1030/Complex-Find-Conditions Jeremy Burns jeremybu...@me.com On 17 May 2010, at 12:04, Master Ram wrote: > hi... i am new to cakephp, > how to put search query. i have 3 fields. i want to do "OR" operation. > please give any example.. > >

Re: Layout

2010-05-17 Thread Jeremy Burns
Anything you can achieve with any web page you can achieve with Cake. Most of the apps/demos/tutorials you'll see revolve around CRUD activity, because that's what most sites do - but, of course, you don't have to. Jeremy Burns jeremybu...@me.com On 17 May 2010, at 01:

Re: Relationship Problem

2010-05-17 Thread Jeremy Burns
Then why do you think that Cake can fix that? If you want to run a query directly in Cake (which is generally a bad thing) get it working in SQL first. Jeremy Burns jeremybu...@me.com On 17 May 2010, at 10:16, Dilip Godhani wrote: > its not give me right output...! > > On Mon, May

Re: Relationship Problem

2010-05-17 Thread Jeremy Burns
What happens when you run that sql in an SQL client? Jeremy Burns jeremybu...@me.com On 17 May 2010, at 10:09, Dilip Godhani wrote: > > also i create one manual query but it is also not working can u check my > manual query??? > > > $this->set('i

Re: Cake tags

2010-05-15 Thread Jeremy Burns
->Html->tableCells( array( array( $your_td_array ) ) ); I haven't tried this, but it *might* work? Jeremy Burns jeremybu...@me.com On 15 May 2010, at 10:34, Ed Propsner wrote: > $num_of_cols = 6; > > echo > $html-&g

Re: Cake tags

2010-05-15 Thread Jeremy Burns
I do like a challenge... Can you give a bit more context around what you are trying to do? Jeremy Burns jeremybu...@me.com On 15 May 2010, at 07:26, Ed Propsner wrote: > For most of you this is going to seem so trivial that it's almost laughable > so laugh if you must :) >

Re: Currently logged user in Cake 1.3 Final

2010-05-14 Thread Jeremy Burns
Do you mean 'get all currently logged in users' (i.e. from a central server based admin point of view) or display information about 'me' when I am logged in? The latter is achieved by looking inside $this->Auth->user(); Jeremy Burns jeremybu...@me.com On 14 May 201

Re: Offering 10% (negotiable) equity stake to new team member for next-gen product.

2010-05-14 Thread Jeremy Burns
Very thorough pitch. I know it's hard to quantify, but what is 10% worth? What's the share capital, projected net profits, time to market... Do you have venture capital, if so what are their expectations/exit strategy/time frame. How big is the team? How much is built already? Je

Re: HasOne relation between model with DB like datasource a model with notDB like datasource

2010-05-14 Thread Jeremy Burns
I would do two finds and merge the array afterwards. Assuming ModelA hasOne ModelB, do a find on ModelA, pick up the value of the matching id in ModelB, then do a find first on ModelB where id = $id. Jeremy Burns jeremybu...@me.com On 14 May 2010, at 12:06, marco.rizze...@gmail.com wrote

Re: Not able to update record

2010-05-14 Thread Jeremy Burns
This is caused by your order statement in your hasMany SubCategory... > 'MainCategory.mainCategory ASC', Try removing it. Jeremy Burns jeremybu...@me.com On 14 May 2010, at 10:38, Ambika Kulkarni wrote: > > I changed the file name from maincategory.php to main_category

Re: Not able to update record

2010-05-14 Thread Jeremy Burns
o this... Why are you using $_POST? It seems as if your form has a field called 'id' that maps to your model/table field main_category_id...baffling. Change this line: $this->MainCategory->mainCategoryId = $_POST['id']; ...to this: $this->MainCategory->main_categ

Re: how write update query in cakephp

2010-05-13 Thread Jeremy Burns
Here's a clue: > duplicate key value violates unique constraint "tblcdlog_pkey" You are trying to create a duplicate row in the database. Jeremy Burns jeremybu...@me.com On 13 May 2010, at 14:00, Narendra Padala wrote: > Warning (512): SQL Error: ERROR: duplicate key

Re: how write update query in cakephp

2010-05-13 Thread Jeremy Burns
I'm sorry to sound unhelpful, but have you read the error message? Jeremy Burns jeremybu...@me.com On 13 May 2010, at 13:53, Narendra Padala wrote: > hi sir, > i did that one now i got this error sir please help me out sir > > Warning (2): pg_query() [function.pg-query]: Qu

Re: how write update query in cakephp

2010-05-13 Thread Jeremy Burns
dlog']['strerrordesc']='value'; > > $this->data['Tblcdlog']['dtmcreated']='value'; > > $this->Tblcdlog->save($this->data); > Jeremy Burns jeremybu...@me.com On 13 May 2010, at 13:36, Narendra Padala wrote: >

Re: how write update query in cakephp

2010-05-13 Thread Jeremy Burns
Have you even looked at the online guide? http://book.cakephp.org/view/1031/Saving-Your-Data Jeremy Burns jeremybu...@me.com On 13 May 2010, at 11:00, Narendra Padala wrote: > > Hi...All!, > > I am new to cake php,I am suing postgreSql i need to update some > fields in my

Re: how to store drop down selected element in the table

2010-05-13 Thread Jeremy Burns
> What do you get when you debug $this->data just before you do the save? Jeremy Burns jeremybu...@me.com On 13 May 2010, at 09:03, Master Ram wrote: > sir its storing only "0" i has to change something like 1 or 2 or 3 > etc. > > its not giving any error sir >

Re: how to store drop down selected element in the table

2010-05-13 Thread Jeremy Burns
I think your model name should be Agency, for a start. You haven't specified what error you are getting. What do you get when you debug $this->data just before you do the save? Jeremy Burns jeremybu...@me.com On 13 May 2010, at 08:48, Master Ram wrote: > Hi... all > > i am

Re: Newbie Question about Upgrading

2010-05-12 Thread Jeremy Burns
r query is requesting too much unnecessary data that is causing the load problems, not the performance of MySQL. Jeremy Burns jeremybu...@me.com On 12 May 2010, at 19:35, Ephs wrote: > Hello, > > About two years ago I had someone make a website for me, and he used > CakePHP. Now, I

Re: How i Give Css on link

2010-05-12 Thread Jeremy Burns
Spooky... Jeremy Burns jeremybu...@me.com On 12 May 2010, at 14:24, Sam Sherlock wrote: > do you mean give a link a class or id attribute? > > pass your attribs to the options param of HtmlHelper link > > echo $html->link('Search',array('action'=>&

Re: How i Give Css on link

2010-05-12 Thread Jeremy Burns
.cakephp.org/view/1442/link As an aside, you don't need to use $this->params['controller']. By default, Cake will use the current controller when building the link. Jeremy Burns jeremybu...@me.com On 12 May 2010, at 12:11, Dilip Godhani wrote: > how i appply css on link tag &g

Re: edit the table data.

2010-05-12 Thread Jeremy Burns
Pleased to help. Master Ram - I have seen several posts from you and the answer almost always lies in compliance with standards. If you are new to Cake, why are you not sticking to what works? You are swimming against the tide. Jeremy Burns jeremybu...@me.com On 12 May 2010, at 10:50, Master

Re: edit the table data.

2010-05-12 Thread Jeremy Burns
ted woes). You haven't said so, but I presume the table is called 'promoters'? If so, make sure you have this line in your Promoter model: var $primaryKey = 'promoter_id'; In terms of sample code - have you even looked at the guide? Jeremy Burns jeremybu...@me.com On

Re: how can I generate a static html page from ctp in the shell

2010-05-11 Thread Jeremy Burns
By the way, the page can be made up of pure html - it does not have to be PHP at all. The view action in the pages controller can be as simple as: function view() { } This will render your view.ctp file and the static html within it. Jeremy Burns jeremybu...@me.com On 12 May 2010, at 05:13

Re: how can I generate a static html page from ctp in the shell

2010-05-11 Thread Jeremy Burns
ew file is called view.ctp and stored in /app/views/pages). http://book.cakephp.org/view/958/The-Pages-Controller Jeremy Burns jeremybu...@me.com On 11 May 2010, at 23:57, DevouringStrossus wrote: > hi > I want to generate a static html page from ctp. > Moreover, I think I am such with th

Re: edit last row in the table.

2010-05-11 Thread Jeremy Burns
Just being picky - you don't need limit => 1 if you are doing a find first. Jeremy Burns jeremybu...@me.com On 11 May 2010, at 23:33, Stefano Martins wrote: > This should do the trick: > > public function bla() > { > $lastPost = $this->Post->find(

Re: Issue with find('list')

2010-05-11 Thread Jeremy Burns
I *think* Cake does some inflections and expects the variable to be 'finishedProducts'. So... > $this->set('finishedProducts', > $this->Configuration-FinishedProduct->find('list')); Jeremy Burns jeremybu...@me.com On 11 May 2010, at 22:25, Stefano

Re: edit last row in the table.

2010-05-11 Thread Jeremy Burns
Do a find first sorted by id desc, then do a straightforward edit. Something like should get the last row: $row = $this->Model->find( 'first', array( 'order' => array('Model.id DESC') 'recursive' =&

Re: Js helper - hide on change

2010-05-11 Thread Jeremy Burns
Thanks Paul - looks like exactly what I am looking for. I am using jQuery, by the way. I'll post back my final results. Jeremy Burns jeremybu...@me.com On 11 May 2010, at 08:03, WebbedIT wrote: > I'm not great with js myself, but happy to give you my thoughts for > whatev

Re: One Parent Model for All Other Models?

2010-05-10 Thread Jeremy Burns
you to extract very precise data queries. You can also access a model that is not associated to the Schedule model by using loadModel first: $this->loadModel('Timezone'); $this-> Timezone->function(); Does that help? Jeremy Burns jeremybu...@me.com On 11 May 2010, at 00:1

Js helper - hide on change

2010-05-10 Thread Jeremy Burns
Javascript is a bit foreign to me, so I am struggling to accomplish something that is probably quite straightforward. I have a select list. When its value is changed, I want to check it's new value. Then I want to hide or show one or more divs depending on that value. How do I d this with the Js h

<    9   10   11   12   13   14   15   16   17   18   >