Notice: Undefined variable:

2006-08-10 Thread Cheeze
Hi, I've got quite a fundamental problem when using Cake. I've searched through the postings but no appropriate solution. It's like this: I've created an edit function in my controller and a corresponding edit.thtml file. I've got 2 simple tables (abbreviated): products ( id int(11), name

Re: controller &Model : what's the matter of " ...us" ? "US"?

2006-08-10 Thread JitZhang
how to set up a custom inflection in /app/config/inflections.php. Can you give me a sample? 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@go

Re: HABTM with modfication date + realted data

2006-08-10 Thread [EMAIL PROTECTED]
I had the same problem but here is something like you want: --- --Licitations CREATE TABLE `licitaciones` ( `id` int(10) unsigned NOT NULL auto_increment, `codigo` varchar(50) collate latin1_general_ci NOT NULL, `nombre` varchar(50) collate latin1_general_ci NOT NULL, `descripcion` text co

Re: ?CAKEPHP=d550b7b78dbfe545d4afeda95d470eaa appended to all urls

2006-08-10 Thread John David Anderson (_psychic_)
On Aug 10, 2006, at 3:12 PM, John David Anderson (_psychic_) wrote: >> The CakePHP developers need to fix whatever they broke related to >> sessions/cookies in 1.1.7. I'd log a bug report if I knew how... http://trac.cakephp.org, by the way. -- John --~--~-~--~~~--

Re: ?CAKEPHP=d550b7b78dbfe545d4afeda95d470eaa appended to all urls

2006-08-10 Thread John David Anderson (_psychic_)
On Aug 10, 2006, at 3:02 PM, [EMAIL PROTECTED] wrote: > > Actually I was wrong: it does work properly (ie the cookie is *not* > appended to the url) now that I switched back to 1.1.6 release. I > just > had to click on some urls to get the cookies going again. Is this a trans_sid php.ini set

Re: ?CAKEPHP=d550b7b78dbfe545d4afeda95d470eaa appended to all urls

2006-08-10 Thread [EMAIL PROTECTED]
Actually I was wrong: it does work properly (ie the cookie is *not* appended to the url) now that I switched back to 1.1.6 release. I just had to click on some urls to get the cookies going again. The CakePHP developers need to fix whatever they broke related to sessions/cookies in 1.1.7. I'd l

Re: Custom SQL Requests?

2006-08-10 Thread Mikee Freedom
I think if I understand correctly, you might be able to find what you want here: http://manual.cakephp.org/chapter/models basically there are a few different ways of retrieving your data - find, findAll, query, etc. find and findAll have scope for order by and limit and such, then anything outs

Re: Elements, variables and layouts

2006-08-10 Thread Mikee Freedom
Morning Peter, The you can set within each action of your controller by setting the variable: $this->pageTitle If you would like to pass data to your layouts all you need to do is: >From your controller: $this->set('some_variable',array('some'=>'data'); Then within your layout (or your view

Re: how to use a controller's view (w ajax) as view element

2006-08-10 Thread Mikee Freedom
hey Alex, I'm new to Cake so this may not be the right answer. But in my early toying I've discovered that you can call the `renderElement()` function within your views and also within your layout. if you need to pass parameters to it then you do the same as if you were passing it to the view. i.

url need index.php?

2006-08-10 Thread Bernard Grosperrin
I have everything working pretty well, but I have setup my test directory as on a production server, not using .htacccess, but with the rewrite instructions in the httpd.conf: DocumentRoot "c:/ApacheSSL/htdocs/cake/app/webroot" ErrorLog logs/Cake-error.log CustomLog logs/Cake-acce

Re: controller &Model : what's the matter of " ...us" ? "US"?

2006-08-10 Thread ryanb006
The inflections in Cake PHP for making the controller name singular in order to select the correct model are trained to make words such as radii (plural) into their singular form such as radius. You'll need to set up a custom inflection in /app/config/inflections.php. Ryan --~--~-~--~-

Getting "Error in view %s, got: %s" with PEAR HTTP_Download package

2006-08-10 Thread Matt
Hi all, I have an application built on Cake PHP that leverages the PEAR HTTP_Download package to allow users to download files. When I click a link to download a file it works correctly. If I go back and try to click it again or reload the current page a few times I get the following error from

Re: function search()

2006-08-10 Thread John David Anderson (_psychic_)
On Aug 10, 2006, at 11:21 AM, saavedrajj wrote: > > Anyone? please? Um... is this supposed to be a question? If you're going to start a new thread with an (assumed) old question, can you include it? -- John --~--~-~--~~~---~--~~ You received this message beca

function search()

2006-08-10 Thread saavedrajj
Anyone? please? --~--~-~--~~~---~--~~ 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 mo

Re: [spam] Re: Custom SQL Requests?

2006-08-10 Thread Bernard Grosperrin
John David Anderson (_psychic_) wrote: > You can always use query() and execute() for custom SQL, though I'd > probably stick to the model functions as often as I could. > > -- John > Ok, excellent! Thanks very much for the fast answer, John! Bernard --~--~-~--~~~--

controller &Model : what's the matter of " ...us" ? "US"?

2006-08-10 Thread JitZhang
http://etrade.webcrew.cn/edit/stock_navi/index/1 stock_navi_controller.php class StockNaviController extends AppController { var $name = 'StockNavi'; var $useTable = 'company_stock_mst'; var $primaryKey= 'stock_id'; function edit_index($company_id = null) { } ..

Re: Custom SQL Requests?

2006-08-10 Thread John David Anderson (_psychic_)
On Aug 10, 2006, at 10:09 AM, Bernard Grosperrin wrote: > > Very new, trying to learn and understand. > > What is the proper way to have my own SQL Statements? For example, > if I > want to add "ORDER BY", or "GROUP BY", etc.. You can specify your ORDER BY clauses in find() and findAll() (and

Custom SQL Requests?

2006-08-10 Thread Bernard Grosperrin
Very new, trying to learn and understand. What is the proper way to have my own SQL Statements? For example, if I want to add "ORDER BY", or "GROUP BY", etc.. Have been trying to search for "Custom SQL", but have not found what I was looking for. Thanks for any hint, Bernard --~--~-~

Re: ajax-link -- unable to get it working

2006-08-10 Thread nate
Bingo, adding the RequestHandler component to your controller allows it to automatically detect Ajax requests generated by Prototype, and disables layout rendering. RequestHandler also has some other methods for detecting different things about the HTTP request itself. You can read more about it

Re: multi-column primary keys (like in lots of join tables/habtm)

2006-08-10 Thread nate
The patches seem like they would work just fine, but that's just me looking at them, not having tested them. I'll take it on faith that they're well tested. However, if you search the Cake core for 'primaryKey,' you'll find that it is used in many other places, and IMO changing them all would be

Re: Views for e-mails

2006-08-10 Thread Samuel DeVore
Like http://www.thinkingphp.org/2006/08/05/a-solution-for-e-mail-sending-in-cakephp/or http://wiki.cakephp.org/tutorials:sending_emailThere are some others at http://cakephp.org/search?q=emailSam D On 8/10/06, Gonçalo Marrafa <[EMAIL PROTECTED]> wrote: Hi.Is it possible to have views that are not

Views for e-mails

2006-08-10 Thread Gonçalo Marrafa
Hi. Is it possible to have views that are not for display? I want my system to send e-mails on certain events and i would like to have multiple templates, one for each of those events. I would like to be able to use them as a regular view. Kinda like: function foo() { ... some code ... $

Re: multi-column primary keys (like in lots of join tables/habtm)

2006-08-10 Thread Albert Siersema
> In developing Cake, we've chosen to adhere to certain conventions in > order to keep things simple. That's what makes Cake work. The > decision not to allow the use of mutli-column primary keys is > reflective of the opinions inherent to the framework. Aha, that sound about the same as the ch

Re: multi-column primary keys (like in lots of join tables/habtm)

2006-08-10 Thread nate
Taken from the standpoint of an SQL engineer, what Josh is saying is obviously completely valid and accurate (I changed my tune a little after reading the 3 articles you just posted ;-), in fact, I agree with most of what he has to say. As Josh himself says, multi-column keys result in more compl

Re: Session variable being deleted on redirect

2006-08-10 Thread Jonathan Snook
NickW wrote: > $this->Session->write($this->referer() . rand()); > > and then printing the session at the top of the edit action. When I > first hit the edit action I get one random number in the session, and > then when I submit the form it redirects me to another random number. > But like I sai

Re: one form,two submit,hao to submist to action what you want?

2006-08-10 Thread JitZhang
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 optio

Re: ?CAKEPHP=d550b7b78dbfe545d4afeda95d470eaa appended to all urls

2006-08-10 Thread [EMAIL PROTECTED]
I originally got this problem using 1.1.7 release, but I also get the same problem with 1.1.6 release. --~--~-~--~~~---~--~~ 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@

Re: one form,two submit,hao to submist to action what you want?

2006-08-10 Thread ByteDoc
You mean JavaScript is not allowed? In the case of a HTML form the action is to be set in the form tag, if you can't set it dynamically. That said, there is only one possible action for the same form. What you can do is read the submitted value of the submit button and do the different handling

Re: ?CAKEPHP=d550b7b78dbfe545d4afeda95d470eaa appended to all urls

2006-08-10 Thread Mark Garrigan
I think there is an issue with CakePHP 1.1.7.3363. I just grabbed the latest stable version and installed it to my shared hosting. (Dreamhost). All my links have this appended to the urls. And I can't shake it no matter what. Delete cookies, Clear Cache, Quit Browser. So overwrote the new cake fil

Re: Elements, variables and layouts

2006-08-10 Thread Peter Boosten
Oh, if I say 'Title', I do not mean . Peter --~--~-~--~~~---~--~~ 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 emai

how to use a controller's view (w ajax) as view element

2006-08-10 Thread Alex
I took the tutorial about building an ajax to-do list (http://grahambird.co.uk/cake/tutorials/ajax.php - it seems to be down now..) and all works great. I even made some modifications to make it degrade in case there's no JS. What i want now, is to be able to present those views in a certain div

Re: one form,two submit,hao to submist to action what you want?

2006-08-10 Thread JitZhang
thank you suggestion,But customer allow use JavaScript! --~--~-~--~~~---~--~~ 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

Re: Insert into tables without id

2006-08-10 Thread Peter Boosten
Why don't you have an ID-field on your table? Doesn't hurt to have one, IMHO. Peter --~--~-~--~~~---~--~~ 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 T

Elements, variables and layouts

2006-08-10 Thread Peter Boosten
It's possible to submit an array with variables into an element (using renderElement). I've tried this from a view and it worked like charm. But I want my elements in my default layout. How do I submit variables into that element, from the view. The element holds a title for a page, that's depend

Insert into tables without id

2006-08-10 Thread Gonçalo Marrafa
Hi. I want to insert records in a table that doesn't have an ID field. Cake inserts the data successfully but, after the insert, it tries to get the last inserted ID and executes "SELECT last_value AS max FROM ...". Since the table doesn't have the sequence it expects it to, all the inserts fail!

Re: one form,two submit,hao to submist to action what you want?

2006-08-10 Thread ByteDoc
Add the onClick event to your buttons, like this: This changes the target action for the form before it gets submitted. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, se

one form,two submit,hao to submist to action what you want?

2006-08-10 Thread JitZhang
one form,two submit,hao to submist to action what you want? werasd --~--~-~--~~~---~--~~ 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 unsubscri

Re: multi-column primary keys (like in lots of join tables/habtm)

2006-08-10 Thread loonatic
> Here's a bit of discussion that took place here a few weeks ago... >http://groups.google.com/group/cake-php/browse_thread/thread/d2bf4bb245201cb/015f0feefd9ff482?lnk=gst&q=composite&rnum=1#015f0feefd9ff482 Thats not really a discussion. "And Tony Marston is the last person I would be reading f

Re: multi-column primary keys (like in lots of join tables/habtm)

2006-08-10 Thread Albert Siersema
(first off: this isn't meant as criticism or a way for me to point out there are shortcomings in the cakephp (RoR/ORM/... ) way, it's more of a 'live, discuss & learn' conversation for me) > Well, the first one was quite interesting in the way it condemned the > use of primary keys altogether. I