Re: coding a loop in cake?

2010-08-13 Thread Jeremy Burns | Class Outfit
What's so wrong with using the (auto incrementing unique) id field then? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 13 Aug 2010, at 08:39, Tomfox Wiranata wrote: hey sam, thx. the number is sth like a product code. each product will be assigned

Re: Calling Validation-cc() from the controller

2010-08-13 Thread Jeremy Burns | Class Outfit
['CreditCard'] = $creditCard-validationErrors; endif; endif; Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 13 Aug 2010, at 08:55, Wilhelm wrote: Hi, I am implementing a e-commerce website, in my

Re: Calling Validation-cc() from the controller

2010-08-13 Thread Jeremy Burns | Class Outfit
I let the card processing company do that - is there a way to do it locally before submitting? I'd be interested if there is a method for that. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 13 Aug 2010, at 09:20, Louie Miranda wrote: How about validating

Re: coding a loop in cake?

2010-08-13 Thread Jeremy Burns | Class Outfit
ahead of time without doing lots of fancy stuff. Reading this whole trail it seems that you are using a sledgehammer to crack a nut. I'd keep it simple and let the database do what it was born to do. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 13 Aug

Re: coding a loop in cake?

2010-08-13 Thread Jeremy Burns | Class Outfit
. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 13 Aug 2010, at 10:04, Tomfox Wiranata wrote: so you would suggest auto_increment? On 13 Aug., 10:48, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: The number will rise by 1 on each insert

Re: coding a loop in cake?

2010-08-13 Thread Jeremy Burns | Class Outfit
Use the right data type. If you are concerned about the numbers running out use an unsigned bigint; that goes to 1,8446,744,073,709,551,615. Would that be enough for you? ;-) http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html Jeremy Burns Class Outfit jeremybu...@classoutfit.com http

Re: Not serving css or js

2010-08-12 Thread Jeremy Burns | Class Outfit
Check that your .htaccess files are present and correct. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 12 Aug 2010, at 11:34, Paul wrote: Hi, I've recently started with Cake and I'm having trouble serving script files despite following the docs: http

Re: coding a loop in cake?

2010-08-11 Thread Jeremy Burns | Class Outfit
it is a duplicate), generate a random number, save it and only create another one of the save fails (then rinse and repeat). Would a UUID work for you? That would save you some effort. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 11 Aug 2010, at 10:18, Tomfox Wiranata

Re: coding a loop in cake?

2010-08-11 Thread Jeremy Burns | Class Outfit
/Using-UUIDs-as-Primary-Keys Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 11 Aug 2010, at 11:05, Tomfox Wiranata wrote: thx for your reply jeremy. i dont have an unique index for that field. at least i didnt remember doing that.. how do i create

Re: Problem in save Data into DB and with Created and modified fields.

2010-08-10 Thread Jeremy Burns | Class Outfit
. If there is one, Cake will update that row. If there isn't one, Cake will create a new row. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 10 Aug 2010, at 06:48, Techinfocomp.com wrote: Hi, i am using 1.3.3 stable version. i am heaving problem with this version

Re: relationship advice

2010-08-10 Thread Jeremy Burns | Class Outfit
That sounds like one table too many to me. You can get what you want by doing simple finds, made even easier by using the containable behaviour, IMO. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 10 Aug 2010, at 11:26, Felix wrote: Thanks, Jeremy, Andras

Re: how do i preset a value for an input field?

2010-08-10 Thread Jeremy Burns | Class Outfit
Use the 'default' option: echo $this-Form-input('fieldName', array('default' = 'your default')); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 10 Aug 2010, at 14:47, james wrote: I'm passing some variables from a view to an add and I would like those

Re: customize error message

2010-08-09 Thread Jeremy Burns | Class Outfit
' = 'example_class')) See http://book.cakephp.org/view/1313/setFlash Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 8 Aug 2010, at 05:38, hoss7 wrote: how can i customize error message(setflash or flash function)? Check out the new CakePHP Questions

Re: how to make sum query on cake ?

2010-08-09 Thread Jeremy Burns | Class Outfit
There is an example here (http://book.cakephp.org/view/1030/Complex-Find-Conditions) that shows how to do a MIN query, which is essentially the same thing. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 9 Aug 2010, at 10:09, Cruisine wrote: hi i'm still

Re: how to make sum query on cake ?

2010-08-09 Thread Jeremy Burns | Class Outfit
Follow the MIN example, and replace the MIN with SUM. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 9 Aug 2010, at 10:34, Cruisine wrote: tq for ur answer. but i couldnt found any statement that explaining about how to sum a field in query on cakephp

Re: auto input value to a field

2010-08-09 Thread Jeremy Burns | Class Outfit
Use the default property: http://book.cakephp.org/view/1402/options-default Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 9 Aug 2010, at 16:00, james wrote: Hi, I have a user field that at the moment is populated via a dropdown that is a list of all

Re: relationship advice

2010-08-09 Thread Jeremy Burns | Class Outfit
I'd be tempted to have an order_items table that is not ruled by habtm. Then you can add columns for product_id, quantity, price_charged, tax, dispatched etc. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 9 Aug 2010, at 17:27, Felix wrote: Hi, I

Re: Element inside element

2010-08-07 Thread Jeremy Burns | Class Outfit
Have you tried? If so, what happens? Sent from my iPad On 8 Aug 2010, at 03:09, Hugo M ham1...@gmail.com wrote: It is possibly to render an element inside another element? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

Re: how can I check for a specific value in my session?

2010-08-06 Thread Jeremy Burns | Class Outfit
You can check if a session element exists by using the check method (http://book.cakephp.org/view/403/check). So: if ($this-Session-check('abc.imageuploaded')): do something; else: do nothing; endif; Jeremy Burns Class Outfit jeremybu...@classoutfit.com http

saveAll does'nt work

2010-07-29 Thread Jeremy
today, I find function saveAll can not work ,when save data into two relations tables, blew is the data, Array ( [User] = Array ( [username] = tester [password] = 17acdc1ee8e4ed05e9d27fce4df6d4b5de036910 [email] = tes...@admin.com

Re: calling model function from controller.

2010-07-28 Thread Jeremy Burns | Class Outfit
Let's assume we are dealing with the Post model. In Post model: function whatever() { return Text; } From the posts controller: $variable = $this-Post-whatever(); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 28 Jul 2010, at 10:54, neeraj kumar

Re: Phrase inflections

2010-07-21 Thread Jeremy Burns | Class Outfit
http://book.cakephp.org/view/953/Inflections Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 20 Jul 2010, at 18:36, desheffer wrote: I have a model called LeaveOfAbsence. The proper English name for the pluralized controller would be LeavesOfAbsence rather

Re: Email Component

2010-07-21 Thread Jeremy Burns | Class Outfit
Have you tried clearing the cache (/app/tmp/cache/...and sub folders)? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 21 Jul 2010, at 03:06, Hugo M wrote: Mm... if you have Linux you can check in /etc/php5/apache2/php.ini the sendmail configuration

Re: Undefined property: View::$Session

2010-07-21 Thread Jeremy Burns | Class Outfit
What are you calling and what error are you getting? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 21 Jul 2010, at 19:01, Abby wrote: I am getting this error when I am using check function. I have added Session to helper and component in my controller

Re: How to find if findBy... is empty?

2010-07-20 Thread Jeremy Burns | Class Outfit
$jobstatus = $this-Jobstatus-findByTrackingno($this-data['Jobstatus']['track'])); if (empty($jobstatus): do something; else: do something else; endif; $this-set('jobstatus', $jobstatus); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 19

Re: cakephp email component

2010-07-20 Thread Jeremy Burns | Class Outfit
It is so hard to help you with questions like this when we don't know what's going wrong. Can you be more specific? Can you paste an error message? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 19 Jul 2010, at 08:12, fadhli - wrote: ?php class

Re: setFlash not displaying

2010-07-16 Thread Jeremy Burns | Class Outfit
Which version of Cake are you using? There's no need to check for the presence of a message; -flash() takes care of that for you. On 1.3: echo $this-Session-flash(); On 1.2: $this-Session-flash(); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 16 Jul

Re: CakePHP 1.3 Form Helper creating drop down and not input field

2010-07-16 Thread Jeremy Burns | Class Outfit
the array variables in your controller) or should they all be inputs (in which case you should add the 'type' = 'text' option to your form input). Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 16 Jul 2010, at 15:14, spheroid wrote: I have a database

Re: Connecting two tables with diffrent/ special key

2010-07-16 Thread Jeremy Burns | Class Outfit
Got it. Can I make a suggestion? This suggests poor data integrity as child records (favs) can exist after the parent record (products) have been deleted. Would it not be better to mark a product as 'deleted' rather than actually deleting it? Jeremy Burns Class Outfit jeremybu

Re: alt tag for text box

2010-07-15 Thread Jeremy Burns | Class Outfit
I'm happy to be corrected, but I think the 'alt' tag only exists for images (that's HTML, not Cake). Also interested to see you using inline styles - are you not using CSS? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Jul 2010, at 11:42, Master Ram

Re: function problem in controller

2010-07-14 Thread Jeremy Burns | Class Outfit
$this-text(); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 14 Jul 2010, at 07:15, Master Ram wrote: Hi. to all in my controller i am using one function. function text() { ;;; 1000 lines of code ;;; } function add() { //Here i

Re: applying css to form input fields

2010-07-14 Thread Jeremy Burns | Class Outfit
You probably just need to tweak the CSS using display: inline and so on. What does the HTML output look like? It'll be easier to advise once we see that. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 14 Jul 2010, at 10:43, Tomfox Wiranata wrote: hi, i

Re: applying css to form input fields

2010-07-14 Thread Jeremy Burns | Class Outfit
View page source in your browser. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 14 Jul 2010, at 10:54, Tomfox Wiranata wrote: hi jeremy, is there a feature that show how it looks in html? On 14 Jul., 11:48, Jeremy Burns | Class Outfit jeremybu

Re: applying css to form input fields

2010-07-14 Thread Jeremy Burns | Class Outfit
So I guess you need to apply some style to div.loginfield label and div.loginfield input[type=text]. Perhaps make them display: inline for a start and give the label a width? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 14 Jul 2010, at 11:02, Tomfox

Re: cake 1.3.2 wants to be too smart

2010-07-14 Thread Jeremy Burns | Class Outfit
I don't know if this would work for you and your set up, but could you populate and set the timestamp from within Cake using the date() function instead of relying on the database? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Jul 2010, at 05:26, djogo

Re: Problem with deleting record

2010-07-14 Thread Jeremy Burns | Class Outfit
See this thread: http://groups.google.com/group/cake-php/browse_thread/thread/94b90f0a9a0cdfd1/7ccde5a6f8f86f95?hl=enlnk=gstq=back+button#7ccde5a6f8f86f95 Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Jul 2010, at 05:38, vanishri wrote: Hi All, I

Re: when and why using different models/controllers?

2010-07-13 Thread Jeremy Burns | Class Outfit
A spot on reply. A broad brush to view it is to start from the database and create a model/controller/views for each table. That will take you pretty near where you want to go, and then you can start to combine things together. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http

Re: Too many SQL queries!!

2010-07-13 Thread Jeremy Burns | Class Outfit
Out of interest, what is your debug level? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 13 Jul 2010, at 10:57, Alex Bovey wrote: Hi Nick, Thanks for the reply. Sorry I should have said in my original post - I'm already using Containable

Re: Fatal error: Allowed memory size of 16777216 bytes exhausted

2010-07-13 Thread Jeremy Burns | Class Outfit
, then you will not have optimum performance. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 13 Jul 2010, at 12:58, Ayman Bedair wrote: This happened with me on the local windows server while testing, didn't really see the problem up on my live one. Anyway

Re: Another model displayField

2010-07-12 Thread Jeremy Burns | Class Outfit
From within model1s_controller: $this-Model1-Model2-find('list'); This assumes that Model1 and Model2 have $hasMany $belongsTo relationships defined within them. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 12 Jul 2010, at 16:10, Samueljslg wrote: Hi

Re: Js helper advice needed

2010-07-12 Thread Jeremy Burns | Class Outfit
() { Configure::write('debug', 0); $this-render('login', 'ajax'); } And everything is working as expected. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 11 Jul 2010, at 20:27, nurvzy wrote: This was an issue I ran into while doing an ajax shopping cart

Re: Connecting two tables with diffrent/ special key

2010-07-12 Thread Jeremy Burns | Class Outfit
Before spending loads of time on this, wouldn't Product.id and Fav.product_id be the same? Why can't you just join on these fields? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 13 Jul 2010, at 01:56, brototyp wrote: Hi guys, I'm pretty new in Cake and I

Re: set($data) dosenĀ“t work

2010-07-10 Thread Jeremy Burns | Class Outfit
Doing it like that they'd be numeric wouldn't they? In other words, $this-data[0] would equal 'kat_checkboxes'. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 10 Jul 2010, at 18:35, Davor Ilic wrote: i use it like

Re: Weird Core Problem with Cake1.3.2

2010-07-09 Thread Jeremy Burns | Class Outfit
- are you using the new version and have you completed the rest of the migration steps? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 9 Jul 2010, at 16:32, euromark wrote: We are heaving the weirdest problems after updating to from 1.2 to 1.3.2 on our

Re: Session-setFlash error

2010-07-09 Thread Jeremy Burns | Class Outfit
If you are on 1.3, don't forget to add the Session helper and Session component to your app_controller. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 9 Jul 2010, at 20:51, gautam lakum wrote: I am getting this error in my default.ctp layout. Notice

Re: can't retrieve data from a form

2010-07-08 Thread Jeremy Burns | Class Outfit
That's not Cake being fussy - it's HTML. The helper just does the heavy lifting of writing html for you, and a form has to open, contain elements and then close. Anything not inside the form will be ignored. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 8

Re: Webshop in CakePHP

2010-07-08 Thread Jeremy Burns | Class Outfit
There is also Kaching - http://github.com/mfriesen/kaching-php Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 8 Jul 2010, at 21:49, Emil Christensen wrote: Thanks for the inputs. I'll take a look. ;) On 8 July 2010 20:39, mike karthauser mi

Re: Can Cake do this?

2010-07-08 Thread Jeremy Burns | Class Outfit
of the box. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 9 Jul 2010, at 03:50, Bill P. wrote: ok, great. Every framework sounds great and makes it sounds liek it can do anything, until you actualy try to get it to work. thanks for the feedback. I

Re: Database associations

2010-07-08 Thread Jeremy Burns | Class Outfit
You can use the join statement: http://book.cakephp.org/view/1047/Joining-tables )although it's not ideal). Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 9 Jul 2010, at 00:06, Justin Beeler wrote: I'm working with two tables: Contacts and Calls. I

Re: Fatal error: Call to undefined method ThemeView::RenderElement()

2010-07-07 Thread Jeremy Burns | Class Outfit
http://book.cakephp.org/view/1566/View-and-Helpers Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 7 Jul 2010, at 05:58, arif hossen wrote: Dear Experts, I need help. i got below this problem when i have added renderElement in my layout. I have also

Re: Bake, Missing database table error.

2010-07-05 Thread Jeremy Burns | Class Outfit
It is assuming that ApplicantsGuardian is part of a $hasAndBelongsToMany relationship between Applicants and Guardians. Rename it ApplicantGuardian and try again. Sent from my iPad On 5 Jul 2010, at 10:58, Sid saeed.bh...@gmail.com wrote: Hi, I am trying to bake the models, controller and

Re: ERROR: Notice (8): Undefined index: User [APP\views\users\profile.ctp, line 25]- can't find the problem

2010-07-04 Thread Jeremy Burns | Class Outfit
My advice with all of these sort of issues is to debug out the results of the array you are parsing. It then becomes really easy to see what syntax you need to get to the right data: die(debug($your_variable)); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com

Re: Unnecessary Queries??

2010-07-04 Thread Jeremy Burns | Class Outfit
What debug level are you using? See /app/core.php = Configure::write('debug', 2); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Jul 2010, at 02:36, clearflysyst...@googlemail.com wrote: Hi Bakers, I have a simple reordering script setup - Very

Re: Hide empty value in select box

2010-07-02 Thread Jeremy Burns | Class Outfit
A couple of thoughts... What is in the $city array? This will be used to populate the select list, so if there's an empty row there, you'll get an empty row in the list. Is there an option with an id of 1? If not, your default value might be messing things up a bit. Jeremy Burns Class Outfit

Re: Hide empty value in select box

2010-07-02 Thread Jeremy Burns | Class Outfit
The guide says: select(string $fieldName, array $options, mixed $selected, array $attributes) There are only four attributes and you have five. Try: $this-Form-select('city_id', $city, 1, array('empty' = true)); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com

Re: Hide empty value in select box

2010-07-02 Thread Jeremy Burns | Class Outfit
Stumped. I just tried exactly the same code and it worked as necessary. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 2 Jul 2010, at 09:18, sherzo wrote: Hi Jeremy thanks for the reply i used $this-Form-select('city_id', $city, 1, array('empty

Re: making a layout with CSS in CakePHP

2010-07-02 Thread Jeremy Burns | Class Outfit
usual php. I'd recommend looking at the tutorial (http://book.cakephp.org/view/1528/Blog) because that will cover the bases. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 2 Jul 2010, at 16:29, Tomfox Wiranata wrote: hi, before i used cakephp i designed

Using Js helper on select list

2010-07-01 Thread Jeremy Burns
I have a select list that contains a list of currencies. When the user changes the currency, I want to use the Js helper to refresh the cart, which is presented inside a div in the same view. How do I do that? Check out the new CakePHP Questions site http://cakeqs.org and help others with their

Re: echoing data after retrieving it via find. cake doesn't echo the actual value, but rather array

2010-07-01 Thread Jeremy Burns | Class Outfit
to screen and you'll be able to pick your way through to the right part. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 1 Jul 2010, at 16:42, Tomfox Wiranata wrote: hi everyone, i am about to implement a forgot password feature. for that the user has

Re: Accessing one model from another (unrelated) model

2010-06-30 Thread Jeremy Burns | Class Outfit
Question: which is the preferred method; App::import or loadModel? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 30 Jun 2010, at 08:54, Erik Starck wrote: Hi, this is a bit more cakeish: App::import('Product', 'Product'); $this-Product

Re: Cannot get set variable as field from array resulting from find('first')

2010-06-30 Thread Jeremy Burns | Class Outfit
What do you see if you die(debug(retrieveemail)); just after you do your find? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 30 Jun 2010, at 12:21, Rick Dane wrote: I am very lost at this point as I am just going in circles with trying to retrieve data

Re: Cannot get set variable as field from array resulting from find('first')

2010-06-30 Thread Jeremy Burns | Class Outfit
of the controller. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 30 Jun 2010, at 12:26, Rick Dane wrote: I get this: app\controllers\hushmail\retrieveemails_controller.php (line 170) retrieveemail Check out the new CakePHP Questions site http

Re: Accessing one model from another (unrelated) model

2010-06-29 Thread Jeremy Burns | Class Outfit
want to get to it from controllers only, then substitute behaviour for component, or you could even add the data to your config.php file and extract it using Configure::read. I *think* the behaviour route would perform better. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http

Re: Functions does not find global in views?!!

2010-06-29 Thread Jeremy Burns | Class Outfit
Why are you creating the variable again, and why is it global? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 29 Jun 2010, at 00:13, saidbakr wrote: Hi, I set to a view variable called $tests and it is array of some data. In the view, print_r($tests

Re: Is Beginning CakePhp from novice to professional still valid with CakePhp version 1.3.2?

2010-06-29 Thread Jeremy Burns | Class Outfit
$this-Html-link, and so on). Encountering incompatibilities is a good thing as it will make you examine, debug and fix the code, which is a much, much better way of learning than just copying, pasting and running code. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http

Re: Relationships with a common table

2010-06-28 Thread Jeremy Burns | Class Outfit
http://book.cakephp.org/view/1046/Multiple-relations-to-the-same-model Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 27 Jun 2010, at 13:13, jtomka wrote: Hey guys, I'm new to CakePHP and already stuck. I'm trying to use a common contact table

Re: Model naming for SKU?

2010-06-28 Thread Jeremy Burns | Class Outfit
This might not be the answer you'r looking for, but I'd go with a table named stock_keeping_units and build from there. Much easier to understand three years down the road. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 28 Jun 2010, at 17:12, Erik Starck

Re: controllers index function with related tables.

2010-06-25 Thread Jeremy Burns | Class Outfit
directly in the database, or course). Pages that might help: http://book.cakephp.org/view/903/Model-and-Database-Conventions http://book.cakephp.org/view/1323/Containable http://book.cakephp.org/view/1042/belongsTo (has some details on counterCache) Jeremy Burns Class Outfit jeremybu

Re: Model Output as HTML

2010-06-25 Thread Jeremy Burns | Class Outfit
Not sure if I'm missing the point, but might the escape option help? http://book.cakephp.org/view/1445/para Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 25 Jun 2010, at 18:07, cricket wrote: On Thu, Jun 24, 2010 at 1:48 PM, DragonFlyEye dragonflyey

Re: birthday validate

2010-06-23 Thread Jeremy Burns | Class Outfit
, 'dateFormat' = 'MDY', 'timeFormat' = '', 'minYear' = ( date('Y') - 100 ), 'maxYear' = ( date('Y') - 18 ) ) ) Jeremy Burns Class Outfit jeremybu

Auth variables being ignored

2010-06-23 Thread Jeremy Burns
I have a site built on 1.3.2 with the following app_controller.php file: class AppController extends Controller { var $components = array('Auth', 'Session'); var $helpers = array('Html', 'Form', 'Session', 'Text'); function

Re: birthday validate

2010-06-23 Thread Jeremy Burns | Class Outfit
. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 23 Jun 2010, at 09:09, jerry wrote: Thanks for that response but that's not what i was looking for,what i need is for the form to only display previous month up to the current one.Am trying to not let users

Re: Recursive find but not in all models

2010-06-23 Thread Jeremy Burns | Class Outfit
http://book.cakephp.org/view/1323/Containable Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 23 Jun 2010, at 05:12, cdvrooman wrote: Fernando, you should use $this-User-unbindModel(array( 'belongsTo' = array('Company'), 'hasMany' = array

Re: Auth variables being ignored

2010-06-23 Thread Jeremy Burns | Class Outfit
I was making a stupid mistake. For the record, I was calling parent::beforeFilter(), which was overriding my values. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 23 Jun 2010, at 08:55, Jeremy Burns wrote: I have a site built on 1.3.2 with the following

Re: Data validtation

2010-06-23 Thread Jeremy Burns | Class Outfit
: if (! $this-inviteApply-save($this-data)): die(debug($this-inviteApply-validationErrors)); else: //it saved OK - do something endif; Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 23 Jun 2010, at 17:26, Amit Kumar wrote: Hi! I am new to cakePHP

Re: compleax query

2010-06-22 Thread Jeremy Burns | Class Outfit
I *think* you'd have to do it using the query method (which is generally frowned upon as a method of last resort). $this-Model-query($sql); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 22 Jun 2010, at 06:47, rakeshyadav rakeshyadav wrote: hi Good

Re: compleax query

2010-06-22 Thread Jeremy Burns | Class Outfit
( 'Model.fieldname', etc... ) ) ); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 22 Jun 2010, at 08:07, rakeshyadav rakeshyadav wrote: Hi all, Any body tell me the required

Re: forms

2010-06-22 Thread Jeremy Burns | Class Outfit
Help us to help you. If forms are not being created, what IS happening instead? Are you getting errors? Do you have debug set to 2 so that you can see what's going on? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 22 Jun 2010, at 08:46, mirfan wrote: Hi

Re: birthday validate

2010-06-22 Thread Jeremy Burns | Class Outfit
; else: return false; endif; } Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 22 Jun 2010, at 10:16, jerry wrote: I have been using cakephp for a few weeks now but i have failed to know how to validate a date for example a birthday

Re: birthday validate

2010-06-22 Thread Jeremy Burns | Class Outfit
Sorry - just read the post properly and my answer wasn't your solution, but it can be adapted. The key is to write a function and within that compare $check['dob'] with today's date. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 22 Jun 2010, at 12:12

Re: naming convention problem

2010-06-21 Thread Jeremy Burns | Class Outfit
Try using PromoterInterestHobby as the model class. Hobbies is plural of hobby. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 21 Jun 2010, at 11:26, Master Ram wrote: Hi.. i have table name called: promoter_interest_hobbies i used the module name

Re: controller validation methods seem to have no effect.

2010-06-21 Thread Jeremy Burns | Class Outfit
If you set the value of id in your data array Cake assumes you are doing an update rather than an insert, so it might well be true that it validates. Sounds like you need to pull a set of ids from the database and remove them from the data array before attempting your save. Jeremy Burns Class

Re: Persisting complex model data at once

2010-06-18 Thread Jeremy Burns | Class Outfit
I *think* that saveAll only goes to the level n+1, not level n+2. You might have to loop through the data array call saveAll repetitively. PITA, I know. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 17 Jun 2010, at 22:10, Soniya Ahuja wrote: Hi, I

Re: email plugin githup

2010-06-17 Thread Jeremy Burns | Class Outfit
A couple of obvious questions: - What is the Gitihub email plugin? - What isn't working? - What's wrong with the one that comes with CakePHP? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 16 Jun 2010, at 15:55, naveeth wrote: i am using githup email

Re: Model associations problem

2010-06-17 Thread Jeremy Burns | Class Outfit
) ) ) ); Or (in my opinion the better strategy) use the containable behaviour: http://book.cakephp.org/view/1323/Containable. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 17 Jun 2010, at 00:43, ryanl wrote: I'm

Re: Would it be possible to use different default.ctp (or shall I say, different templates) for each controllers?

2010-06-17 Thread Jeremy Burns | Class Outfit
In your controller function type: $this-layout = 'goodbye'; Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 18 Jun 2010, at 04:30, Louie Miranda wrote: Would it be possible to use different default.ctp (or shall I say, different templates) for each

Re: serious problem with cakephp about CakePHP Auth Component Permissions

2010-06-16 Thread Jeremy Burns | Class Outfit
Hamed - you need to be clearer about what your problem is else no-one can help you. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 16 Jun 2010, at 09:22, hoss7 wrote: this is my code http://www.box.net/shared/sulzlckko6 Check out the new CakePHP

Re: Cupcake forum plugin and Cake 1.3

2010-06-16 Thread Jeremy Burns | Class Outfit
I don't know Cupcake but have had similar issues with other plug ins. Try creating a folder within /app/webroot/ with the same name as the plug in folder. Then copy the css, img, and js folders (if appropriate) into the new folder. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http

Re: Error when running cakephp

2010-06-16 Thread Jeremy Burns | Class Outfit
as the default. You could just change a few characters. The important thing is that once you start using them you can't change them - they are used to encrypt and decrypt passwords, for example. See http://book.cakephp.org/view/931/CakePHP-Core-Configuration-Variables for more details. Jeremy Burns

Re: Cupcake forum plugin and Cake 1.3

2010-06-16 Thread Jeremy Burns | Class Outfit
Wow - that's a surprise. I wouldn't have expected any degradation just by creating a few new folders. Sorry it don't help. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 16 Jun 2010, at 15:08, Mike wrote: Thanks Jeremy, but unfortunately that does

Re: Automagic Form (Drop down list)

2010-06-15 Thread Jeremy Burns | Class Outfit
and field naming conventions. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Jun 2010, at 14:00, Shaz wrote: Probably something really simple but I can't figure it out / find information on it: Got a form (add article) with a drop down list

Re: serious problem with cakephp about CakePHP Auth Component Permissions

2010-06-15 Thread Jeremy Burns | Class Outfit
Why doesn't the solution you forwarded meet your needs? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Jun 2010, at 18:12, hoss7 wrote: hi i have serious problem with cakephp about CakePHP Auth Component Permissions i am search in the internet

Re: serious problem with cakephp about CakePHP Auth Component Permissions

2010-06-15 Thread Jeremy Burns | Class Outfit
Have you read the guide? http://book.cakephp.org/view/1543/Simple-Acl-controlled-Application Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 16 Jun 2010, at 05:45, hoss7 wrote: i want Users, Groups Permissions for Groups, for my website Check out

Re: Need help in url rewriting in cake php code.

2010-06-14 Thread Jeremy Burns
If you want those urls, you don't want Cake. Jeremy Burns jeremybu...@me.com On 14 Jun 2010, at 16:24, mirza ameer wrote: Hi, Iam mirza ameer, i want to rewrite my website urls. for example now my urls for the product menu is : http://misspaulettehair.com/index.php/categories/ now

Re: Migrating to 1.3 - error undefned property: view::$session in default.cpt

2010-06-12 Thread Jeremy Burns
Add the Session helper and component to your app_controller, then call it with $this-Session... Jeremy Burns jeremybu...@me.com On 12 Jun 2010, at 13:01, Melanie Sommer wrote: Sorry I forgot the second part of the error message: Fatal error: Call to a member function flash() on a non

Re: Need advice for storing copies of data

2010-06-10 Thread Jeremy Burns | Class Outfit
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 2010, at 10:17

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.classoutfit.com On 10 Jun 2010, at 16:46, phpcoder2

Re: Forms and Descriptions

2010-06-10 Thread Jeremy Burns | Class Outfit
Wild stab without thinking, researching or testing... I think you could do: 'after' = 'span class=descriptionMy description.../span' ...and then style span.description. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 10 Jun 2010, at 17:00, phpcoder2

Re: Forms and Descriptions

2010-06-10 Thread Jeremy Burns | Class Outfit
Just for completeness, there are five options that are potential descriptors: - label - before - between (comes between the label and input) - separator - after http://book.cakephp.org/view/1393/options-before-options-between-options-separator-a Jeremy Burns Class Outfit jeremybu

Re: How to create login page using app_controller.php

2010-06-08 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 wrote user

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