Re: HABTM Delete only join table

2007-09-06 Thread deepc
Thanks, looks good. is it possible to use it with cake 1.1? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this

Re: Table PK data type

2007-09-06 Thread Marcus T. Jaschen
porksmash wrote: Does the PK for a table absolutely, positively have to be an integer? I think I saw this somewhere but can't find it again. Also having some weird issues trying to use another data type for my PK. With the latest version of CakePHP 1.2.0 from SVN you can use UUIDs as Primary

Re: Complex table relationship within one model

2007-09-06 Thread AD7six
Hi Jason, Sorry, somethings (How do I keep coders from using these models to edit the tables?) lead me to believe you were asking a (internal?) security question. And sorry if that tainted the tone of my reply. On Sep 6, 12:23 am, Jason [EMAIL PROTECTED] wrote: snip It's not so much a security

dynamic model and database config

2007-09-06 Thread Mike Green
Dear all Has anybody here successfully created a database config and model dynamically using the latest cake 1.2? I want to create something not a million miles away from phpmyadmin, and as you can imagine, for an app like that, you cant pre-set the database or models before hand as you know

Re: dynamic model and database config

2007-09-06 Thread [EMAIL PROTECTED]
Your best bet here is to create new config members in the DATABASE_CONFIG class, you can then use DataSource:reconnect to swap your alt config for the others you've just created. Your models would then useDbConfig alt, which would actually no longer be alt, but whichever config you reconnected

Re: dynamic model and database config

2007-09-06 Thread Mike Green
Thanks for that, I've got slightly further along which i'm very very happy about. I still need to find a way of discovering what any particular table's primarykey is, otherwise my paginator will keep trying to find a field called ID. Many thanks MIke On 06/09/07, [EMAIL PROTECTED] [EMAIL

datetime

2007-09-06 Thread Copot
I have a model called Contest with two datetime fields (starts_at, ends_at) In the view, I have ?php echo $form-create('Contest', array('enctype' = 'multipart/form- data'));? ?php echo $form-input('Contest.id', array('type' = 'hidden'));? ?php echo

Re: query error -- regarding people plural and person singular

2007-09-06 Thread LS
Something is not right there (scracthing head...) There! It should be Event.person_id = Person.id... shouldn't it? You don't have a Person.event_id field in your database, as far as I can see... What relationship are you using on your models? Maybe you should change the $hasOne to $hasMany or

more info on Association Data Mapping

2007-09-06 Thread rtanz
hi i would like to know if there are any resources from where i can understand what is meant bt Association Data Mapping thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group,

Re: Problem with $hasAndBelongsToMany

2007-09-06 Thread LS
Hello there! what is dodaj? A function in the model that you declared? Regards, - LS On Sep 5, 7:53 pm, lemon [EMAIL PROTECTED] wrote: Hi Well, I've got strange problem. I've created 3 tables. 1) nauczyciels 2) przedmiots 3) nauczyciel_przedmiots When I try to add user in table

Decimal input

2007-09-06 Thread LS
Hello, everyone! I have searched the group, but i couldn't find anything related to this... I USA, you guys use the numbers in the format ##,###,###.## (note the dots and commas). Here in Brazil, we use ##.###.###,##. I was wondering if cake has some built-in function/configuration to retrieve

Re: dynamic model and database config

2007-09-06 Thread [EMAIL PROTECTED]
I would take a look at Model::loadInfo() if I were you, also Model::primaryKey Hope they help! Simon On Sep 6, 11:44 am, Mike Green [EMAIL PROTECTED] wrote: Thanks for that, I've got slightly further along which i'm very very happy about. I still need to find a way of discovering what any

AuthComponent - Alternate ways to hash passwords?

2007-09-06 Thread MrTufty
Hi all, Just a quick question - I've searched, but found nothing definitive. I'm building my site with Cake and I've decided to use the built-in ACL/Auth stuff rather than write my own (mostly because I'm sure you're all a lot smarter than I am, and if it works for you, then it'll probably work

Re: AuthComponent - Alternate ways to hash passwords?

2007-09-06 Thread francky06l
I had the same problem, and some others ..I use the Auth components but made few changes in the application wihtout modifications to the core : - do not use the name password in the views (login or other user management views), but another dummy name. Handle this dummy name (hash or whatever and

Re: datetime

2007-09-06 Thread majna
In controller before save() method: $this-cleanUpFields('Contest'); http://api.cakephp.org/1.2/class_controller.html#f6d9f131aca280eb1c21e3665b0de659 On Sep 6, 12:41 pm, Copot [EMAIL PROTECTED] wrote: I have a model called Contest with two datetime fields (starts_at, ends_at) In the

Re: Decimal input

2007-09-06 Thread majna
Mayby PHP number_format($myNumber, 2, ',', '.'); http://php.net/number_format On Sep 6, 1:12 pm, LS [EMAIL PROTECTED] wrote: Hello, everyone! I have searched the group, but i couldn't find anything related to this... I USA, you guys use the numbers in the format ##,###,###.## (note the

Re: more info on Association Data Mapping

2007-09-06 Thread majna
Me too! This: http://www.martinfowler.com/eaaCatalog/associationTableMapping.html or this : http://en.wikipedia.org/wiki/Object-relational_mapping or ? On Sep 6, 12:55 pm, rtanz [EMAIL PROTECTED] wrote: hi i would like to know if there are any resources from where i can understand what is

Re: dynamic model and database config

2007-09-06 Thread Mike Green
Thanks for your help it is now working perfectly. I've added a small helper function into the model to make things a lot easier: function setSource($tableName) { $this-setDataSource($this-useDbConfig); $db = ConnectionManager::getDataSource($this-useDbConfig);

Re: An idea to improve cake's code design

2007-09-06 Thread Gustavo Carreno
Where has the file gone to ? Link is no longer valid On 9/3/07, xephex [EMAIL PROTECTED] wrote: When reading throug CakePHP's code, an idea came to me and I wanted to share it with you. It became a bit more text than I thougt so I put it into a PDF.

How can I send parameters via get to index with cool url

2007-09-06 Thread alanclic
How can I send a parameter to an index page not using this: site/index/ parameter; I want to know if it's possible to send it like this: /site/ parameter ?? Thank you! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

cake con informix - tengo conexión con la bd a travé de ADOdb pero no puedo acceder a ninguna tabla

2007-09-06 Thread superbully
Hola ! Estoy probando cakePHP con una base de datos informix a través del driver ADOdb pero no tengo acceso a ninguna tabla. Si me creo un modelo llamado 'articulo' y su respectivo controlador 'articulos' cuando cake intenta acceder al modelo me dice: 'No Database table for model Articulo

cake con informix - tengo conexión con la bd a travé de ADOdb pero no puedo acceder a ninguna tabla

2007-09-06 Thread superbully
Hola ! Estoy probando cakePHP con una base de datos informix a través del driver ADOdb pero no tengo acceso a ninguna tabla. Cuando ejecuto http://localhost/cake me dice: 'Your database configuration file is present.' 'Cake is able to connect to the database.' Hasta aquí todo

Transactions and errors

2007-09-06 Thread [EMAIL PROTECTED]
With a lot of help from threads here, I have been able to get transactions working with my MySQL database. However, the problem that I am running into now is that I don't know when SQL or other types of errors occur that would make me want to rollback the transaction. I looked into the onError()

Writing non-database models

2007-09-06 Thread Zeekar
Where can I find doc on what a Model class has to implement to work properly? I've got a flat-file database I'm trying to incorporate into a Cake app. I wrote findAll(), but the scaffold index view didn't work - it shows one row per record, but those rows are empty except for the action links

Re: Transactions and errors

2007-09-06 Thread majna
Maybe (for 1.1.x): $db = ConnectionManager::getDataSource('default'); if (isset($db-error)) { debug($db-error); } if you put: function onError() in model, callback will work. Or try with lastError ()

Re: How can I send parameters via get to index with cool url

2007-09-06 Thread majna
You can map all route site/* to site/index/ exmpl for 1.1.x $Route-connect('/site/*', array('controller' = 'site', 'action' = 'index')); but all others must be maped before this (index) one : site/view/* site/view site/add/* site/add On Sep 6, 7:45 am, alanclic [EMAIL PROTECTED] wrote: How

Re: How can I send parameters via get to index with cool url

2007-09-06 Thread Pablo Viojo
Also, try Named Parameters (native in 1.2, for 1.1 [1]) [1] http://bakery.cakephp.org/articles/view/passing-named-parameters -- Pablo Viojo [EMAIL PROTECTED] http://pviojo.net On 9/6/07, majna [EMAIL PROTECTED] wrote: You can map all route site/* to site/index/ exmpl for 1.1.x

ARO, ACl ,initdb questioni in Cook up websites fast IBM

2007-09-06 Thread SIXS
Hi, I washaving trouble with has many etc so I started the Cook up websites fast with IBM and in part 2 I am told to create ACL with initdb. I must have created something, but when I ran it it told me it found the database and only referred to acos, not the other two tables. I wonder if there

Jake and Cake form actions url encoding

2007-09-06 Thread Romano
Hi all, My Cake forms seem to work nicely running with Jake. Form actions are translated as expected. Now I'm using a joomla template which has nice tabs on the top. After submitting a form the app loses track of the (menu) Itemid which is normally attached to Joomla menu urls. I gather that

Re: cake con informix - tengo conexión con la bd a travé de ADOdb pero no puedo acceder a ninguna tabla

2007-09-06 Thread AD7six
On Sep 6, 10:49 am, superbully [EMAIL PROTECTED] wrote: Hola ! snip I see you already found the spanish group ;) AD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send

CakePHP hosting service

2007-09-06 Thread hondya
Could some one recommend a hosting service for using cakephp. I am looking for something which is affordable and scalable in long term. Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To

API Documentation Generator

2007-09-06 Thread MarkH
I'm investigating the use of Doxygen / PHPDocumentor with Cake programs. According to the output at http://api.cakephp.org/1.2/ it's generated by Doxygen 1.5.2. However, in my tests I can't get doxygen to parse the cake sources without heaps of errors and it was my understanding that doxygen

Re: API Documentation Generator

2007-09-06 Thread djiize
Where did you see it was parsed by Doxygen? I still use PHPDocumentor, and I remember a post from phpNut saying it was parsed by this tool... http://www.phpdoc.org/ On 6 sep, 16:00, MarkH [EMAIL PROTECTED] wrote: I'm investigating the use of Doxygen / PHPDocumentor with Cake programs.

favicon not working

2007-09-06 Thread rtanz
hi i have set a favicon but it is not being displayed, i jsut have the default browser icon displayed near the url. what can be the problem ? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group.

Re: query error -- regarding people plural and person singular

2007-09-06 Thread Jon Bennett
hi Jim, How are your associations setup? They should be: class Person { var $hasMany = array('Event'); } class Event { var $belongsTo = array('Person'); } hth jon On 05/09/07, SIXS [EMAIL PROTECTED] wrote: Hi, re when I run my events relating to people, i get this output I made

Re: How can I send parameters via get to index with cool url

2007-09-06 Thread alanclic
Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more

Some notes on Auth (with something done about them)

2007-09-06 Thread David
Hi guys, I'm quite new to Cake, so forgive me if any of this sounds stupid/ unnecessary. I've been playing around with Cake 1.2's Auth component, and found that there were a few things slightly awry with it: - If you put 'login' or '*' in the allowed actions, the login code is never called,

Re: CakePHP hosting service

2007-09-06 Thread kionae
I use Bluehost (http://www.bluehost.com). I haven't had any trouble using cakephp with them, and they've got great customer service. There may be cheaper hosting plans out there, but Bluehost won't cost you an arm and a leg by any means (if you pre-pay for two years of hosting (their advertised

import or display RSS

2007-09-06 Thread carSign
Hi - I found some good information on using cake to display a rss feed from content on my site - any good tutorials or examples on how to use cake to pull an RSS feed and display the contents? thanks Drew --~--~-~--~~~---~--~~ You received this message because

Re: import or display RSS

2007-09-06 Thread majna
Retriving and parsing http://bakery.cakephp.org/articles/view/simplepie-cakephp-component Display : http://bakery.cakephp.org/articles/view/rss-feed-them-cake On Sep 6, 7:46 pm, carSign [EMAIL PROTECTED] wrote: Hi - I found some good information on using cake to display a rss feed from

Re: favicon not working

2007-09-06 Thread majna
In html source should be: link rel=shortcut icon href=/ favicon.ico type=image/x-icon / favicon.ico in webroot/ clear browser cache or ctrl+F5 try another (valid) icon... On Sep 6, 5:53 pm, rtanz [EMAIL PROTECTED] wrote: hi i have set a favicon but it is not being displayed, i jsut have the

Re: CakePHP hosting service

2007-09-06 Thread Sam Sherlock
media temple Grid Server. On 06/09/07, Vincent [EMAIL PROTECTED] wrote: I am using dreamhost and it works well. no lighting fast though. On Sep 6, 6:44 pm, kionae [EMAIL PROTECTED] wrote: I use Bluehost (http://www.bluehost.com). I haven't had any trouble using cakephp with them, and

Useing bake script to create models

2007-09-06 Thread su6z3r0
Hi guys, I am trying to use bake (v. 1.2 cake) to create models. The database setup is very easy for testing purposes: products: id details: id product_id Now what I expected when useing bake is that it detects the association Product hasMany Detail because of the nameing convention. But

Useing bake script to create models

2007-09-06 Thread su6z3r0
Hi guys, I am trying to use bake (v. 1.2 cake) to create models. The database setup is very easy for testing purposes: products: id details: id product_id Now what I expected when useing bake is that it detects the association Product hasMany Detail because of the nameing convention. But

cake1.2

2007-09-06 Thread Vincent
Hello - Can anybody give a status update on 1.2? Any roadmap for it? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To

Re: cake1.2

2007-09-06 Thread John David Anderson (_psychic_)
On Sep 6, 2007, at 12:35 PM, Vincent wrote: Hello - Can anybody give a status update on 1.2? Any roadmap for it? https://trac.cakephp.org/roadmap -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake

Re: CakePHP hosting service

2007-09-06 Thread Vincent
I am using dreamhost and it works well. no lighting fast though. On Sep 6, 6:44 pm, kionae [EMAIL PROTECTED] wrote: I use Bluehost (http://www.bluehost.com). I haven't had any trouble using cakephp with them, and they've got great customer service. There may be cheaper hosting plans out

Re: CakePHP hosting service

2007-09-06 Thread Baz
Hey Vincent, you say DreamHost is slow? I'm planning on moving in a few months and I was thinking about DreamHost... anything I should know? -- Baz L Web Development 2.0 http://WebDevelopment2.com/ On 9/6/07, Vincent [EMAIL PROTECTED] wrote: I am using dreamhost and it works well. no

Best place to put odds ends functions?

2007-09-06 Thread [EMAIL PROTECTED]
Where's the best place to put odds ends functions that don't necessarily fit in any controllers, but may apply to them all? For example I have a function that takes an array from a findAll, and returns an array of the primary ids. Where should this go? app_controller.php? Thanks in advance!

Cakephp question - easy lists (scaffolded)

2007-09-06 Thread jwerd
Hello Everyone. I am writing a DVD rip library software in cake as one of my first projects. I'll give you the layout and the associations. dvds CREATE TABLE `dvds` ( `id` int(11) NOT NULL auto_increment, `title` varchar(55) default NULL, `body` text, `status_id` int(11) default NULL,

Re: Best place to put odds ends functions?

2007-09-06 Thread majna
In app_controller. On Sep 6, 10:29 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Where's the best place to put odds ends functions that don't necessarily fit in any controllers, but may apply to them all? For example I have a function that takes an array from a findAll, and returns an

Re: Best place to put odds ends functions?

2007-09-06 Thread Pablo Viojo
app_controller if related to controller app_model if related to model bootstrap.php if general -- Pablo Viojo [EMAIL PROTECTED] http://pviojo.net On 9/6/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Where's the best place to put odds ends functions that don't necessarily fit in any

preventing private controller functions from being access via browser

2007-09-06 Thread [EMAIL PROTECTED]
Can someone recommend a scheme for preventing a user from accessing a private controller function, is this an ACL issue or something of that nature? I read the section in the manual on Controllers but didn't see anything that indicated how this might happen. And, maybe the function needs to be

Re: favicon not working

2007-09-06 Thread Gayathiri
Upload the generated file (favicon.ico) to your site(inside webroot folder). Verify it's there by typing http://mysite.com/favicon.ico in the browser's location, where mysite.com is your site's address. Next, insert the below code in the HEAD section of your pages, at the very least, your site's

Re: preventing private controller functions from being access via browser

2007-09-06 Thread Chris Hartjes
On 9/6/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Can someone recommend a scheme for preventing a user from accessing a private controller function, is this an ACL issue or something of that nature? If you prefix a function in a controller with an underscore (as in _foo()) then it cannot

Re: Best place to put odds ends functions?

2007-09-06 Thread MattC
app_controller is an ok solution, but can get unwielding if you have a lot of functions. I think a better approach is to make a component. Also the specific function you described can be handled by Cake's awesome Set class. See:

Render a View that's not HTML?

2007-09-06 Thread bteeter
I'm developing an app which is a set of business data in a MySQL backend. One of the views I'd like to provide is a graph it view. Basically I want to use Cake to get data into the Model and jpgraph to create a graph. The code works, and the page correctly works with jpgraph to create an image.

Re: Best place to put odds ends functions?

2007-09-06 Thread Pablo Viojo
By bootstrap.php I mean app/config/bootstrap.php Pablo On 9/6/07, Pablo Viojo [EMAIL PROTECTED] wrote: app_controller if related to controller app_model if related to model bootstrap.php if general -- Pablo Viojo [EMAIL PROTECTED] http://pviojo.net On 9/6/07, [EMAIL PROTECTED]

help please

2007-09-06 Thread Gayathiri
Hi, I am using a ajax form( a small box kind..) on the right side of my webpage for login purpose. After user logs in ajax box is updated. But I need the entire page to be refreshed along with the ajax form update when user logs in. How do i do that? Is there a way to refresh a page from

Re: Render a View that's not HTML?

2007-09-06 Thread John David Anderson (_psychic_)
On Sep 6, 2007, at 2:54 PM, bteeter wrote: I'm developing an app which is a set of business data in a MySQL backend. One of the views I'd like to provide is a graph it view. Basically I want to use Cake to get data into the Model and jpgraph to create a graph. The code works, and the

Re: Cakephp question - easy lists (scaffolded)

2007-09-06 Thread rtconner
DVD belongsTo Status is the relationship you want to add. (Yes I'm aware DVD's don't actually belong to a status, belongsTo is just a name) Also, shouldn't your table be called statuses instead of status... http://manual.cakephp.org/appendix/conventions On Sep 6, 1:48 pm, jwerd [EMAIL

Re: Column names not showing in bake.php

2007-09-06 Thread red
Yes, I have the same problem. Use previous stable release 1.1.16.5421. I don't know why this bug wasn't fixed yet :( On 6 Wrz, 18:27, jm [EMAIL PROTECTED] wrote: When I use the bake.php script from the command line and try to bake a model and select to supply validation criteria for the fidls

Re: help please

2007-09-06 Thread rtconner
I'd say just implement the code in this blog post, and then do a redirect upon successful login. http://cakebaker.42dh.com/2006/03/15/redirect-with-ajax/ On Sep 6, 2:38 pm, Gayathiri [EMAIL PROTECTED] wrote: Hi, I am using a ajax form( a small box kind..) on the right side of my webpage for

Re: Best place to put odds ends functions?

2007-09-06 Thread [EMAIL PROTECTED]
Nice, thanks! On Sep 6, 1:54 pm, MattC [EMAIL PROTECTED] wrote: app_controller is an ok solution, but can get unwielding if you have a lot of functions. I think a better approach is to make a component. Also the specific function you described can be handled by Cake's awesome Set class.

Problem inserting '['

2007-09-06 Thread Darwiin
Hi, I'm using cakephp for my blog, and I'm using textile helper to render my post. Sometimes I need to insert ' --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Problem inserting '['

2007-09-06 Thread Darwiin
Hi, I'm using cakephp for my blog, and I'm using textile helper to render my post. Sometimes I need to insert ' --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: Writing non-database models

2007-09-06 Thread Geoff Ford
Its not Model that you should be implementing. You shoudl be looking at a database driver to access the flat files. Start here http://api.cakephp.org/1.2/class_dbo_source.html and use one of the existing drivers as an example. Geoff -- http://lemoncake.wordpress.com On Sep 7, 7:36 am,

Re: CakePHP hosting service

2007-09-06 Thread [EMAIL PROTECTED]
Be sure to check out their status page http://www.dreamhoststatus.com as well to get an idea of some of the recurring network problems they've had this and last year. Keep in mind that they do have 1000's of servers when you see all the hardware being replaced posts. For the average Joe they

Re: Complex table relationship within one model

2007-09-06 Thread Jason
On Sep 6, 4:02 am, AD7six [EMAIL PROTECTED] wrote: Hi Jason, Sorry, somethings (How do I keep coders from using these models to edit the tables?) lead me to believe you were asking a (internal?) security question. And sorry if that tainted the tone of my reply. Aye, I could have been

Re: Some notes on Auth (with something done about them)

2007-09-06 Thread Chris Hartjes
On 9/6/07, David [EMAIL PROTECTED] wrote: Hi guys, I'm quite new to Cake, so forgive me if any of this sounds stupid/ unnecessary. I've been playing around with Cake 1.2's Auth component, and found that there were a few things slightly awry with it: - If you put 'login' or '*' in the

Re: Best place to put odds ends functions?

2007-09-06 Thread Grant Cox
Out of interest, is your function that takes an array from a findAll, and returns an array of the primary ids something like: $results = $this-Model-findAll(); $primary_ids = Set::extract($results, '{n}.Model.id'); --~--~-~--~~~---~--~~ You received this message

Re: Some notes on Auth (with something done about them)

2007-09-06 Thread Grant Cox
I've not used the Cake Auth, but some of your points sound quite good. If you would like any of these to be considered for enhancements into the core, you have to post them as tickets at https://trac.cakephp.org/ . Each issue as a separate ticket would be a good idea. On Sep 7, 3:21 am, David