making record of logged in user

2010-08-11 Thread james
Is it possible when submitting a form to grab the id of the user that has entered the data? I would guess you would grab Auth.User.username but then how would you enter that into the field thats to be saved? thanks! Check out the new CakePHP Questions site http://cakeqs.org and help others with

how do i preset a value for an input field?

2010-08-10 Thread james
I'm passing some variables from a view to an add and I would like those variables to be preset in some of the input fields. So for in lead->view.ctp i get the variable $leads['Lead'] ['business_name']; and pass it to appointment->add.ctp. in this second view the field business name (still an inp

auto input value to a field

2010-08-09 Thread james
Hi, I have a user field that at the moment is populated via a dropdown that is a list of all users in the tabel. What I'd like to do is auto populate that field from theAuth.User.username value so that the user never has to enter their name in a record. How is this done? thanks! Check out the n

ecommerce

2010-08-07 Thread james
Hi does anyone know of any ecommerce tuts out there? be interesting to put cakephp into an ecommerce app. Cheers! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google G

Re: HABTM

2010-08-03 Thread james livsey
> > On Aug 2, 9:45 am, james wrote: > > Just out of interest, I haent done much with habtm relationships yet > > (they're a bit messy!) but its unavoidable. That being the case, do > > you have to include models and views for join tables? > > > >

HABTM

2010-08-02 Thread james
Just out of interest, I haent done much with habtm relationships yet (they're a bit messy!) but its unavoidable. That being the case, do you have to include models and views for join tables? Thanks! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP rel

Re: compare dates query

2010-07-28 Thread james
Thanks Amit, I have no idea what I had set wrong but it seems to be working as it should now with no alterations from me.. Maybe the remote app just needed a bit of time to catch up.. Many thanks for your reply!! On 28 July, 15:36, Amit Rawat wrote: > Hello James, > > Are both of the

compare dates query

2010-07-28 Thread james
Hi, I'm using the datepicker widget to allow the user to enter dates to filter by. The query I build is $filterAppts = $this->Appt->find('all', array('conditions'=>array('Appt.date' => $date1),)); where $date1 is the date value passed back by the datepicker through $date1 = $this->data[

Re: calling method passing employee_id variable

2010-07-21 Thread james
7;]['employee'])) { >     $this->redirect(array('action' => 'filter', $this->data['Lead'] > ['employee'])); >   } >   // Rest of code here > > } > > hth > grigri > > On Jul 21, 10:20 am, james wrote: > > > Im

calling method passing employee_id variable

2010-07-21 Thread james
Im having a real noob time with this! Im trying to refine the information that is represented in an index based on the selection from a combo box which has a list of employees. The user selects the employee they want, clicks go and view then gets refined to all records associated to that employee_

array post gives number not string

2010-07-19 Thread james
I have an input that is fed from an array like; $sales = $this->Lead->User->find('list', array( 'fields' => 'username', 'position')); and that is then set in the normal way and i access it like this in my view; echo $form->input('sales', array ( 'la

Re: Please help | Newbie in cakephp

2010-07-14 Thread james livsey
Have you tried to decalre the display field? if you add the line var $displayField = 'name'; in the artists model class it should show the name instead of the id field. Hope that helps! On Wed, Jul 14, 2010 at 4:15 AM, Jramirez07 wrote: > Hello, > > I am very new to cake and started using t

Re: filtering

2010-07-08 Thread james livsey
What sort of filtering and for what are you after? > > On Jul 8, 10:08 am, james wrote: > > Hi I am also looking for some advice on filtering. Are these the best > > tutorials? > > > > thanks. > > Check out the new CakePHP Questions site http://cakeqs.org and help other

filtering

2010-07-08 Thread james
Hi I am also looking for some advice on filtering. Are these the best tutorials? thanks. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. T

order by then group by

2010-04-22 Thread james revillini
I need to get the positions held by a person. Person hasMany Position. The rub is that Position has a field called effective which is a date field. It's so that HR can assign a person to a position effective on whenever. It's straightforward when it's a new person, but when someone is changing

How much memory should cakephp use?

2009-12-05 Thread James
any ideas. James Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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

thoughts on CakePHP and revision control

2009-11-12 Thread James P. Howard, II
stall of CakePHP. 2. I can use git to checkout CakePHP and make my project a local branch. I am sure there are others, but I'd like to know the best approach based on the experience of others. Thank you, James -- James P. Howard, II, MPA MBCS j...@jameshoward.us signature.asc D

BUG(?) Containable + HABTM: including only Model1 WHERE ... in Model2 also returns all Model1 which do not have a Model2

2009-10-23 Thread james revillini
he hang of writing the contain code was challenging, but it seems to be doing ALMOST what I need now. Only problem is that it now returns not just plans which have been approved (as with DEPARTMENT 2's plan), but also plans which have no entries in the PlanStatus table (as with DEPARTMENT 1

Re: jQuery support in cake

2009-09-26 Thread James K
You can use whatever javascript framework you like. The built-in helpers don't do a whole lot to begin with, so you're not out much by rolling your own. I prefer Mootools, personally and I use that in all my Cake applications. - James On Sep 24, 4:37 am, Intunet wrote: > I'

Re: Opinions please: HTML/css/js vs. AS3/Flex/Flex Builder?

2009-09-11 Thread James K
lient?), is being used to fasciliate bulk file uploads or is delivering audio/video. In the end, however, that's just one opinion. I'm sure you'll find some Flex enthusiasts (who work for Adobe :P) would would disagree with my assessment. - James On Sep 11, 11:16 am, keymaster wrote:

Re: writing logs to the database on access

2009-09-03 Thread James P. Howard, II
og->save($this->data['Log']); > > But if you define in Main model hasMany Logs, you can write like > this: $this->Main->Log->create(); $this->data['Log']['main_id'] = > 23; $this->data['Log']['referrer'] = ... > $t

writing logs to the database on access

2009-08-20 Thread James P. Howard, II
rows in set (0.00 sec) Then I have a simple model for Log that belongs to Main. Inside MainsController, I have a method called view() that displays the Main entry. What is the "correct" way to also have view() create and write the log? Thank you, James -- James P. Howard, II, MPA j

CakePHP SSL Certificate has expired.

2009-08-07 Thread James Barcellano
The certificate *.cakephp.org has expired! Just for anyone wondering, it's still safe to go there! Firefox get's a little over cautious on expired certs. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" grou

Re: HABTM with additional data scaffold update problem.

2009-08-01 Thread James Brown
maybe scaffolding changes the "unique" attribute on the fly On Jul 15, 4:52 pm, Defranco wrote: > Hi, > > Myjointableadditional data get lost when I update any of the 2 > models that has HABTM relation: > > I have 2 models that has HABTM relation and thejointablebetween > these has additional da

Re: HABTM and saveAll(): How to save related model data?

2009-07-12 Thread James Brown
gt; 2 > >                 ) > >         ) > > ) > > > $this->Article->saveAll($data); > > Can you post your LearningAgreement Model and Substitution Model here? > > On Sun, Jul 12, 2009 at 10:15 PM, James Brown > wrote: > > > > &

Re: HABTM and saveAll(): How to save related model data?

2009-07-12 Thread James Brown
gt; On Sun, Jul 12, 2009 at 3:32 PM, James Brown > wrote: > > > > > > > My Models: > > LearningAgreement HABTM Substitution > > > the array I give to the $this->LearningAgreement->saveAll(...) method > > has the following structure > > &g

HABTM and saveAll(): How to save related model data?

2009-07-12 Thread James Brown
My Models: LearningAgreement HABTM Substitution the array I give to the $this->LearningAgreement->saveAll(...) method has the following structure Array ( [LearningAgreement] => Array ( [comment] => testing ) [Substitution] => Array ( [0] =

Re: Joomla modules like functionality in CAKE PHP

2009-07-08 Thread James K
icult when you need to pull data that is non-specific to the action, but to a higher level entity like a "page" (if you were building a CMS, for instance). If you get something working well, myself, as well as others, would be interested in hearing about the approach you went with. - James

Re: Joomla modules like functionality in CAKE PHP

2009-07-07 Thread James K
ith several complete instances of the same model being generated in a single request. - James On Jul 7, 1:44 am, shadab wrote: > Hello All, > > Greetings of the day! > > I want to develop some robust application in CAKE PHP. I would like to > use Joomla module idea in it. L

Re: Problem with Large Datasets

2009-06-16 Thread James K
If I understand correctly, you're running some finds to produce a giant array of user ids that match the conditions submitted by the user. THEN you're trying to take that list of user ids and pass them as a condition to a separate find to return the user details for each of those ids? First off,

Re: Please Please Help - Non conventional CakePHP ACL Setup...

2009-06-11 Thread James K
If you want to use a completely custom security model, you'll have to build a completely custom set of components to support it. Unless you're going to translate your setup into an ACL model, there isn't much you can do. - James On Jun 3, 6:26 am, Jenski wrote: > I have a d

Re: Big difference between CakePHP and Joomla

2009-06-11 Thread James K
Joomla is a CMS application built on a custom framework. CakePHP is just a framework - no application. - James On Jun 11, 4:56 am, bbparis wrote: > Hi, > > I'm now to CakePHP, I like to build a website for kids, an education > and interactive interface, something like (www.cg

Re: api.cakephp.org still broken

2009-05-13 Thread James K
I have no problems viewing the API in Firefox 3.5 or Firefox 2.x, Chrome, or Opera 9.x under Windows. As for IE stop using IE? - James On May 13, 12:54 am, Mr-Yellow wrote: > For months now the API documentation site has not been accessible to > IE. > > The search button is st

Re: Poll: what do you hate about CakePHP?

2009-05-08 Thread James K
ny issues I can bring up could be considered minor gripes when compared to what Cake DOES get you. Cheers and thanks for your hard work and continued dedication to this project. This is a huge service to PHP developers everywhere. Don't let the whiners get to you ;) - James On May 7, 6

Re: big big big problem!!!!

2009-05-05 Thread James K
The built-in Auth component does all this. I would seriously consider having a look there. http://book.cakephp.org/view/172/Authentication Also how do you have IIS configured? Are you using fastcgi or isapi? - James On May 4, 10:42 pm, henry wrote: > Hi everybody, > > Please giv

Re: MVC question: convert DB data to human-readable format: where?

2009-04-25 Thread James K
What exactly are you doing to the data? If you're just re-organizing the array, doing it in the model is appropriate. If you're adding markup, you should do it in the view. - James On Apr 23, 10:08 am, Ernesto wrote: > hello > > i'm wondering what's the best plac

Re: Model Association Not Creating Query Joins

2009-04-25 Thread James K
an empty string, I can't remember) will tell your query to not join any other models. - James On Apr 23, 8:45 pm, Rob Wilkerson wrote: > I have an Alert model, an Account model and an AccountAlert model: > > Alert hasMany AccountAlert > Account hasMany AccountAlert > AccountAl

Re: Where do I start if I was SQL injected?

2009-04-25 Thread James K
on. Look into using the Security component, or be less trusting of your form input. By just saving $this->data, you have no idea how people have changed your form on the client in the meantime. (also you should technically do $this->Model->create($this->data) then do $this->Model- >

Re: Tips for cutting queries and load time?

2009-04-24 Thread James K
I'd look into re-evaluating how you're using ACL. If your ARO/ACO queries are taking that long you may be relying too heavily on Cake's built in (and horribly inefficient) ACL implementation. - James On Apr 24, 10:08 am, "Dave Maharaj :: WidePixels.com" wrote: &

Re: Tips for cutting queries and load time?

2009-04-24 Thread James K
You can modelize views just like you can tables. No need for query() - James On Apr 24, 1:01 pm, brian wrote: > On Fri, Apr 24, 2009 at 11:10 AM, Martin Westin > > wrote: > > > Views, I haven't got my head into yet but it sounds like I probably > > shoul

Re: Where do I start if I was SQL injected?

2009-04-24 Thread James K
How do you know it was SQL injection? What exactly happened? - James On Apr 24, 5:04 pm, Linas wrote: > Excuse me for my lack of knowledge. I've read through discussions on > topic "sql injection", and as far as I understood, it is not likely if > you use CakeP

Re: ACL Design

2009-03-24 Thread James K
cular organization, then check against the ACL tables for that role to find out what that user should be able to do in that context. This leaves your ACL tables MUCH lighter, far less queries need to be run against them as well. - James On Mar 23, 8:13 pm, mguthrie wrote: > I'm looking int

Re: Dynamic MySQL-driven routes

2009-03-24 Thread James K
users to create "shortcut" urls under their name or something? /s/james/product1 Then in your "s" controller, you could do a redirect based on the deconstructed path. This would make it so each user can have their own shortcuts without interfering with other users, and it introduc

Re: Problems with Translate Behaviour in Firefox and Internet Explorer (country code)

2009-03-24 Thread James K
This is why I don't rely on automagic sniffing of locale settings I always recommend that locale be requested from the user and then handled in sessions and/or cookies. This way you can always ensure it is consistent and what the user wants to see. - James On Mar 24, 4:40 am, ar

Re: isapi rewrite 3

2009-03-24 Thread James K
RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?url=$1 [L,QSA] These are the rewrite rules I use with isapi rewrite 3. I would also recommend avoiding the use of a main .htaccess file and just properly set the doc

AJAX helper callback problem

2009-03-09 Thread James
robby/scriptaculous/draggable (I got this link from cake/libs/view/helpers/ajax.php) Is this possible? If so, I don't seem to be getting the syntax right. drag('div'.$i, array('revert' => false, 'onEnd' => 'test ()'))?> Can anybody help me out?

Re: plz help! May i use varchar as primary key

2009-03-08 Thread James K
You can't. All cake models must have an auto-incremented numeric primary key called "id". Even if you weren't using Cake, making a non-numeric, user editable primary key is generally a very bad idea... On Mar 8, 4:31 pm, khurram wrote: > hello! > > 1. can any body tell me,may i use ` id` varcha

Re: How to create models for complex database designs like this?

2009-03-08 Thread James K
Assuming you've properly defined all your relationships, it likely has to do with the name of your foreign key. Cake is usually pretty good at understanding pluralization spellings, but in this instance, it probably just doesn't understand that celebrity_id is a foreign key for celebrities. Specif

Re: Cake bake command on Ubuntu 8.04

2009-03-03 Thread James Louie Puro
Adding $PATH environment variable. 1. Open Terminal Window. In the command line, type. sudo gedit /etc/environment File will be opened with a text editor and with a content similar below. PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" 2. You need to append the

Re: Homepage like a dynamic dashboard

2009-02-26 Thread james revillini
I think it's a pretty solid way to do it. I'm running a dashboard using the same type of code. I don't know how to use the cache to limit queries to the database, but if you're considering building a dashboard for your application, it kind of suggests that the data is going to be changing so qui

EmailComponent only accepts one 'to' recipient?

2009-02-26 Thread james revillini
This can't be right. EmailComponent looks like it only accepts one recipient for the 'to' parameter. Please set me straight. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, se

saveAll failing on > 44 records

2009-02-25 Thread james revillini
This may not even be a cake issue ... it could be in how I have mysql set up or something, so I'm looking for any tips. I can use a saveAll to save up to about 44 records. More than that, it just stops and neither COMMIT nor ROLLBACK are called. If I only to do 43 or less, it works fine. I don

How forwards-compatible is Cake's ACL?

2009-02-24 Thread james revillini
I'm just wondering if Cake's system of doing ACL is the smartest way to implement control logic in a way that will be easy to maintain as the system progresses. It seems that when access control is implemented at the record level, we wind up with a lot of extra work to do (and the potential for m

Re: admin routing issues

2009-02-22 Thread James Louie Puro
You need a user authentication mechanism to logon into the admin part. reading this article might help: http://www.jamesfairhurst.co.uk/posts/view/creating_an_admin_section_with_cakephp On Sun, Feb 22, 2009 at 5:07 AM, Dhana wrote: > > Hi, > > I have uncommented this line in my core.php > > Co

Re: form helper prepending directory name when not needed?

2009-02-22 Thread James Louie Puro
what not use the array controller and action attribute in form create... like create('Signup', array('controller' => 'THECONTROLLER', 'action' => 'YOUR ACTION'))?> On Sun, Feb 22, 2009 at 4:53 AM, horatio wrote: > > > $this->here is "/order/signup/wizard/account" > > and cake lives in > > domai

Re: Question to Database relations $hasMany and belongsTo

2009-02-21 Thread James Louie Puro
You said in your previous post that you are having an index error User not found... right? Honestly, I haven't tried using the searchable behaviour...but try adding (below) in your function search action. $users = $this->Translate->User->find('all'); $this->set('user', $users); and do the foreac

Re: Question to Database relations $hasMany and belongsTo

2009-02-21 Thread James Louie Puro
What is your Model relation for User and Translate? is it like this? function User extends AppModel { var $name = 'User'; var $hasMany = array('Translate'); } and function User extends AppModel { var $name = 'User'; var $belongsTo = array('User'); } also post your view controller action. have

Is ACL right to use to filter records based on membership?

2009-02-20 Thread james revillini
I'm trying to get my head around ACL and figure out if it will be able to filter the available data down to what the user is authorized to see, or if it's just going to lock them out. Example: a regular user visits /departments/index/ (the controller wants to do a Department->paginate()) but this

Re: Question about the actions in aros_acos

2009-02-20 Thread James Louie Puro
I think not...while AROs are elements trying to gain access to a protected system like users and groups, ACOs are elements (actions) that are being protected. so you can add acos (action) in your controller just like function index, view...etc and assign AROs to it. On Fri, Feb 20, 2009 at 5:0

Re: nice new API layout

2009-01-28 Thread James S
Looks like the view source links aren't done yet. Nice work otherwise! James --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@goog

Re: debug kit disappeared in controllers other than Pages.

2009-01-24 Thread James
Case closed. add in my layout.ctp near the bottom of the code. In one (or many) of my controllers, debug was turn off. On 1月24日, 下午5時25分, James wrote: > I included debug.kit in my AppController and it does show properly in > Pages Controller pages (eg, /pages/home.ctp) but disappear in

debug kit disappeared in controllers other than Pages.

2009-01-24 Thread James
I included debug.kit in my AppController and it does show properly in Pages Controller pages (eg, /pages/home.ctp) but disappear in other pages. I tried different layout, javascript=>false, (I use jQuery in home.ctp and Prototype.js in other pages), and none of them works. Any suggestions? --~--

on my way to create an iPhone web app

2009-01-10 Thread James
I am in the middle of creating a iPhone version of my existing Cake app. My first attempt was making something like www.myapp.com/i/ which uses a controller. but the code becomes nasty because I have to copy every logic back in to the is_controller. That's doesn't look like a good practice to me.

Re: how to set up the relationship from 1 coulmn to 2 tables/entities

2009-01-06 Thread James
Thanks Marcelius. This looks like a good way to solve my problem. On Jan 6, 8:31 pm, Marcelius wrote: > projects >   id >   name >   resource_id > > resources >   id >   resource_category_id > > resource_categories >   id >   name //Tools, People, > > O

how to set up the relationship from 1 coulmn to 2 tables/entities

2009-01-06 Thread James
I have a Project table containing two fields resource1 and resource2. Each resource_id could map to either tool table or people table. What's the relationship? class Project extends AppModel { var $name = 'Project'; var $belongsTo = array( 'resource1' => array( 'clas

without "default" Database Configuration: Fatal error: ConnectionManager::getDataSource - Non-existent data source default

2009-01-02 Thread james revillini
I'm debating whether or not this is a bug. What do you think: If I use the bake script and create a database conf called "local", then run it again and create one called "live", then start trying to build models, it will fail with this error message: Fatal error: ConnectionManager::getDataSourc

Re: More then 1 .po file for i18n/l10n

2008-12-11 Thread James K
Yes, you can make folders and separate po files in the locale directories. So if I made a file in locale/eng/LC_MESSAGES/users/ called profile.po, to get the keys out of it, in your app, you'd use the __d function: __d('users/profile', 'welcome_text') On Dec 10, 8:57 pm, gearvOsh <[EMAIL PROTECT

Re: Well formed XML for RESTful web services ...

2008-12-06 Thread James K
d XML or JSON, I turn the debugging off for that action and only turn it back on in that action in the event I need to debug :P Good luck, James On Dec 6, 6:24 pm, Rob <[EMAIL PROTECTED]> wrote: > I'll probably get no response or flames telling me to "just set debug > to 1"

Re: MVC falling to pieces for modern AJAX apps

2008-11-30 Thread James K
eloper's standpoint, AND makes it easier to divide up work amongst a team of developers. Like Nate mentioned, this is not an MVC problem at all, just an integration problem. I hope to share a lot of the knowledge we've gained developing this application on the Bakery at some point. Go

Re: Using PHP to export MySQL data MS excel files

2008-11-27 Thread James K
cult to integrate into an application. Good luck, James On Nov 26, 1:54 am, liaogz82 <[EMAIL PROTECTED]> wrote: > Hi, > > I am looking into ways to use cakePHP to query into MySQL database to > extract out the relevant data, then export out a report in MS excel > that will i

Re: Getting started with themes and static files

2008-11-26 Thread James K
For static pages, just add them to views/pages/ Name them with a .ctp extension You should be able to reach those pages by simply going to yourdomain.com/pages/staticpagename and it'll wrap that content in the default layout. - James On Nov 26, 4:14 pm, Arthur Pemberton <[EMAIL P

Re: Mambo on CakePHP brainstorm

2008-11-24 Thread James K
e you've written a significant amount of code. The more planning you do, the better the end product will be. Good luck! - James On Nov 19, 9:47 am, andphe <[EMAIL PROTECTED]> wrote: > Hi all, I'm on Mambo Dev team, and we realize that while we are > planning our major rew

Re: Integrating PHP and CakePHP

2008-11-12 Thread James K
renderForm(); } Good luck, James On Nov 10, 10:28 pm, TimA1116 <[EMAIL PROTECTED]> wrote: > I would like to integrate a 6 page form created in PHP 5.2.5 into > CakePHP.  I have looked at various posting here and I've tried to > implement what was instructed.  However, I am at a loss

Development Tools, Source Control and Workflows for CakePHP Developers (Windows)???

2008-11-11 Thread James K
Hi All, I'm currently struggling trying to come up with a web development environment and workflow in Windows that doesn't completely suck. I've tried lots of tools (Komodo, Eclipse, Aptana, and several PHP specific editors), and they all seem to be completely lacking in one area or another (or y

Re: Auth: deleted user still logged in

2008-10-16 Thread James K
I disagree. That is an unnecessary query on every page - it's the reason we have session states. This is something that foreign key constrains can solve at the database level. The user shouldn't be able to submit or change any information if their user id does not exist. - James On

Re: How to use MySql's CASE WHEN function with CakePhp

2008-10-15 Thread James K
In these cases, I think it's more appropriate to just use $this- >Something->query('SELECT ') Being able to Inject SQL into the fields collection most likely is not by design and something like that has a high chance of not working in future updates. - James On Oc

Re: Hosting A Cake App On GoDaddy!

2008-10-14 Thread James K
Get the hell off GoDaddy - some of the worst, more incompetent hosting you can buy. I remember when I spent a week debating their staff over what version of PHP was installed on a particular server. phpinfo() reported PHP 4, but they continually insisted it was PHP 5. It took a week before they f

CakePHP 1.2 RC3 - Problem with alphaNumeric validation

2008-10-05 Thread James Pearson
x27; => true ) ) ); In CakePHP 1.2 RC3 both first_name and last_name fail to validate with valid values (or any value infact). I've traced this down to the regex in /cake/lib/validations.php, around lin

Database Conventions: 2 foreign keys to same table

2008-09-30 Thread James
I'm setting up a database that includes tracking of trades of baseball teams. For the teams table I have: CREATE TABLE teams ( id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, city VARCHAR(13), name VARCHAR(12), abbreviation VARCHAR(3) ); I get lost when creat

Re: belongsTo and parent data.

2008-09-25 Thread James Pearson
I found the problem, I had saved the Event model as Events.php instead of Event.php D'oh! JP On Sep 24, 7:15 pm, teknoid <[EMAIL PROTECTED]> wrote: > Are your foreign keys named correctly? > What does your SQL debug tell you about the query? > > On Sep 24, 1:06 pm,

Re: belongsTo and parent data.

2008-09-25 Thread James Pearson
PROTECTED]> wrote: > Are your foreign keys named correctly? > What does your SQL debug tell you about the query? > > On Sep 24, 1:06 pm, James  Pearson <[EMAIL PROTECTED]> wrote: > > > Good Evening, > > > I'm new to cake, and have reached a dead end with  

belongsTo and parent data.

2008-09-24 Thread James Pearson
he details of the first event, and no attempt to join to the eventtypes table is made in any of the queries. The documentation (http://book.cakephp.org/view/78/Associations- Linking-Models-Together) would have me believe that the belongsTo relationship should als

RE sometimes I wonder if cakeph is worth all the trouble - seems like very steep learning curve.

2008-09-08 Thread James Chua
if every employee have to spend months learning this new platform then , must as well code directly in PHP ! Date: Mon, 8 Sep 2008 02:02:41 +0530 From: [EMAIL PROTECTED] To: cake-php@googlegroups.com Subject: Re: dropdown with country,state,city I know that , iwant drop down with pach country

RE: Cake 1.1.19 stable

2008-09-05 Thread James Chua
I have different problem as my customer want to wait for 1.3 > Date: Thu, 4 Sep 2008 23:45:07 -0700 > Subject: Cake 1.1.19 stable > From: [EMAIL PROTECTED] > To: cake-php@googlegroups.com > > > Hello there, > > I have a client that won't let me use 1.2 because 1.1.19 is tagged as > stable wher

RE: is cake really helpful

2008-09-01 Thread James Chua
if cake is really helpful then how come the ibm tutorial full of bugs and I am talking of the jan 08 version ? Thought cake is suppose to make life easier for programmers but if need to update your code every month to keep up with platform without even putting in new features then life is indee

Re: something like Joomla modules

2008-08-25 Thread James K
ement do all the work (queries + rendering). Cake's plug-ins are more akin to Joomla's components. - James On Aug 22, 2:23 pm, luigi7up <[EMAIL PROTECTED]> wrote: > Hello everyone. > > I just started to explore Cake PHP and already love it. > > I'm trying to

Re: Composite primary key

2008-08-25 Thread James K
Cake does not support composite primary keys, but a work around would be to add a single primary key field (id), and then set a unique constraint on your composite key fields. Same effect, and works with cake. If you want to do a custom query, just do $this->modelName- >query('INSERT INTO MyTable

Re: XML dbo driver

2008-07-21 Thread James K
It's going to take you weeks to make a cake compatible XML "dbo driver" when you could just use MySQL and be done in 30 minutes... Making a little admin panel for your client to use to update the values is also a hell of a lot more user friendly than asking them to FTP into the site, download an

Re: another transaction question

2008-07-16 Thread James K
Ah yes, don't forget the begin! Thanks for the follow-up - my bad On Jul 15, 9:58 am, Flávio_GO_BRZ <[EMAIL PROTECTED]> wrote: > English version: > We don't must forget to code before or in begin of 'try' this: > >  $this->modelA->begin()    // This code will start the transaction > > Versão em P

Re: another transaction question

2008-07-13 Thread James K
iled'); $this->modelA->commit(); } catch (Exception $e) { $this->modelA->rollback(); } - James On Jul 13, 4:44 am, . <[EMAIL PROTECTED]> wrote: > if I have more than 2 models A, B, and C, do i need to do a > $this->[model]->begin() for all of the models, or just

Re: Best way to include functionality in models

2008-07-10 Thread James K
I was going to suggest this as well. The beforeSave function fires before save/validation and you can access $this->data and modify it as you see fit. As long as you return true, the script will continue none the wiser. - James On Jul 10, 1:20 pm, Joe <[EMAIL PROTECTED]> wrote: > Y

Re: MSSQL ntext problem

2008-07-10 Thread James K
Oh, PS - I modified the hack so that it only runs when it recognizes an XML type from SQL 2005. If you change my $fieldDescription[$fields[$i]]['type'] == 'xml' to $fieldDescription[$fields[$i]]['type'] == 'text', it should work for ntext fields in general

Re: MSSQL ntext problem

2008-07-10 Thread James K
The official word from the CakePHP team is that "CakePHP does not support ntext fields". You're stuck using the text casting hack. I'm using MS SQL myself, and have had to use it, unfortunately. I'm using 1.2 RC2 and have successfully gotten that same hack to work - you have to change it a bit to

Re: ACO permission inheritance

2008-07-10 Thread James K
Your actions need to be added to the ARO trees in the database if they don't correspond to a default CRUD value (and like I just said, I don't think that even works since there's a separate action field). Try adding your actions to the database? - James On Jul 10, 9:53 am,

Re: ACO permission inheritance

2008-07-10 Thread James K
Actually, I've just double checked the API and I don't even know if it'll accept a CRUD value as part of the ARO object. the check function expects an ARO, an ACO and an action (*, add, update, edit, delete, etc) as a separate parameter. You might want to try that as well. - Jame

Re: ACO permission inheritance

2008-07-10 Thread James K
I assume you're expecting edit to correspond to the "update" field? I was fairly certain Cake would interpret edit as an equivalent for update, but try changing the ACO call from /users/edit to /users/ update and see if that works. - James On Jul 10, 5:12 am, Mattijs <[EMAIL

Re: Echo Fields of Article Ceator/Modifer in View

2008-07-09 Thread James K
so want to look in the manual for more information on the new containable behaviour built into the release candidates of CakePHP 1.2 for how to narrow down what fields/models you want returned (http:// book.cakephp.org/view/474/containable) Good luck, - James On Jul 9, 12:26 am, double07 <[EM

Re: Model

2008-07-09 Thread James K
I agree that this would be the more "cake" way to do it. Just make a "virtual" model that doesn't relate to any specific table and use that model to run hand-written queries. To follow up with the points others have made, they are right - you do not need to associate a model 1:1 with a controller

Re: belongs to question

2008-07-09 Thread James K
As far as I know you can have a model point to itself, however since your foreign key isn't following the naming convention (if the table is named comments, reply_id should be named comment_id), you'll need to define the foreign key name in the belongsTo relationship definition. On Jul 8, 7:07 pm

Re: Can we develop big portals using CakePHP?

2008-07-09 Thread James K
le fashion. Performance and efficiency are things that can always be improved as time goes on, so I generally don't let that stop me from starting large scale projects with Cake. The trade-off is well worth it, IMO. - James On Jul 9, 12:00 am, loguKK <[EMAIL PROTECTED]> wrote: > Hi,

<    1   2   3   >