Re: Paradigm shift :: Procedural - OO Paterns based development

2006-08-03 Thread TimO
kestrelid, If you set up the model associations correctly, you'll be able to save associations in one transaction. HasMany + HasAndBelongsToMany can both be saved in one cake 'method call'. But this doesn't mean your data is brought back to you by just one query or updated by one. But there's

What can Cake do for me?

2006-08-03 Thread Peter Boosten
Hi all, Just wondering: I've written an online survey in plain PHP (to be used in near future) which pulls its questions from MySQL and puts the answers (after presented via a form) back into a table. It's getting complicated: the questions belong to a certain category, which belong to a

Re: OthAuth and sql error

2006-08-03 Thread CraZyLeGs
you need at least mySQL 4.x for the joins. --~--~-~--~~~---~--~~ 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

Re: hasMany works with scaffolding but not baking a controller and view

2006-08-03 Thread ByteDoc
Did you bake it giving the right answers to the questions? Relation of the models? Use of other models? Check following line in your controller: var $uses = array( It should look like this: var $uses = array('Article', 'User'); (unless there are other models to use as well ...) as far

Re: OthAuth and sql error

2006-08-03 Thread lorenzo
CraZyLeGs ha scritto: you need at least mySQL 4.x for the joins. ah, ok, tnk you :) --~--~-~--~~~---~--~~ 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

Advanced Validation - tagIsInvalid() and isFieldError()

2006-08-03 Thread Shutter
Hi, I'm using the Advanced Validation approach by CakeBaker (http://wiki.cakephp.org/tutorials:advanced_validation), and trying to get errors to display properly if a save() fails. In a nutshell, it doesn't display errors because the FormHelper expects HtmlHelper::tagIsInvalid() to return 1 if

Re: Switching Layouts

2006-08-03 Thread Mark Quinn
On 7/31/06, lorenzo [EMAIL PROTECTED] wrote: nate ha scritto: but that's controller code. You should, however, still be able to use $this-layout in your view templates. Sure ... but is better in controller than in view ;) I've just been using ? $this-layout = 'other_layout'; ? which

Help on saving a blob

2006-08-03 Thread francky06l
Hello, I have a small problem saving a file that I uploaded. The file is uploaded correctly on temp directory and I want to insert it into the DB using the save or saveField method. I just do : $this-model-saveField('image', $filename); the $file name contains the correct location of the

Re: Advanced Validation - tagIsInvalid() and isFieldError()

2006-08-03 Thread Mark Quinn
isFieldError takes the full errorString, throws it away and then only returns true or false; This means that the errors are not avilable to you to display. strange that this is the case, i'm assuming its some sort of bug, or something leftover as the code has switched between 2 designs. I'm not

Re: Advanced Validation - tagIsInvalid() and isFieldError()

2006-08-03 Thread Mark Quinn
You may want to consider using Flexifix for this. I could not get it to work for helpers (only controllers and models) but ymmv. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group,

Re: What can Cake do for me?

2006-08-03 Thread John David Anderson (_psychic_)
On Aug 3, 2006, at 4:15 AM, Peter Boosten wrote: Hi all, Just wondering: I've written an online survey in plain PHP (to be used in near future) which pulls its questions from MySQL and puts the answers (after presented via a form) back into a table. It's getting complicated: the

Re: Help on saving a blob

2006-08-03 Thread francky06l
Hello, I have progressed on my stupid mistake.. I found a solution but also searching the way to give a value to a field without the quote..indeed for loading a blob mysql as a function LOAD_FILE, very convenient ..The problem is if I set the value of the field such as :

Re: Help on saving a blob

2006-08-03 Thread Bret Kuhns
If you're doing what I think you are, then you're trying to save the contents of the file itself into a blob field of your database. However, your first example seems to be inserting the file*name* of the file into your blob field. You need the binary data of the file itself and store it in your

Re: Advanced Validation - tagIsInvalid() and isFieldError()

2006-08-03 Thread Shutter
Interesting... I tried Flexifix just now, but it didn't work with helpers properly. The effect of this bug is that I can't use the Advanced Validation technique unless I go in and change the FormHelper manually... the downside being I can't just drop in new versions of Cake in the future. Ah

Re: Switching Layouts

2006-08-03 Thread lorenzo
Mark Quinn ha scritto: my view contains ? $this-controller-set( 'cheese', 'cheddar' ); $cheese = 'brie'; ? put this in your controller: $this-set('cheese','padano'); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Need help on association

2006-08-03 Thread Golfer001
Sorry, I tried to use the search, but I don't even know what keyword to look for: Here is my database structure CREATE TABLE `customers` ( `id` int(10) unsigned NOT NULL, `name` varchar(64) NOT NULL, PRIMARY KEY (`id`) ) CREATE TABLE `products` ( `id` int(10) unsigned NOT NULL,

Re: Need help on association

2006-08-03 Thread John David Anderson (_psychic_)
On Aug 3, 2006, at 10:25 AM, Golfer001 wrote: snip The above doesn't seem to work, when I call Order-findAll(), I don't see each customer_id and product_id being associated with their respective names. Basically, I am trying to do this: SELECT orders.id,customers.name,products.name FROM

Re: Help on saving a blob

2006-08-03 Thread francky06l
Exactly what I want to do and on the way to do it .. Actually using the mysql LOAD_FILE is easier for me (I do not know what is faster or less consuming in term of resources..) Anyway thanks a lot, next steps would be to generate thumbnails and have possibility to display the complete image .. If

Re: Help on saving a blob

2006-08-03 Thread Chris Lamb
Hi, Bret Kuhns [EMAIL PROTECTED] wrote: Now all of the binary data will be stored in a blob in your table (don't let the skeptics scare you away from this approach This[0] is an interesting read (check the comments too!) on this subject. And it'll probably help to keep track of the

Re: Need help on association

2006-08-03 Thread Golfer001
Doh, I accidentally put the $hasMany/$belongsTo declarations in Controller, instead of in models. No wonder it didn't work no matter how I reworked the db and naming conventions. lol John David Anderson (_psychic_) wrote: On Aug 3, 2006, at 10:25 AM, Golfer001 wrote: snip The above doesn't

Special characters from the model and str_replace()

2006-08-03 Thread anarchitect
Good afternoon everbody, i have some troubles turning special characters into clean characters to use for a slug (read: clean url string). I am running a str_replace() over the data that i receive from the model, yet it seams that special characters (such as öäü...) are encoded in something

Re: Help on saving a blob

2006-08-03 Thread francky06l
Well true that the mime type can be tricky or fake. I eventually succeed to make the fileinfo php function working, a really terrible mess.. but after grabing magic from Apache2 and GnuWin32 it seems ok to recognize or guess the mime type. If someone needs to make this work, give me shout...

Re: Special characters from the model and str_replace()

2006-08-03 Thread anarchitect
@John: Yes, i can and it works technically, as the created slug works as expected. Yet esthetically this is not that nice: posts/view/%DCberschrift In German - and i think this counts for other languages - there are replacements for special characters. As indicated in the code above.

social networking

2006-08-03 Thread salimk786
Hello, Can you guys provide some constructive criticism on this : http://salimk786.wordpress.com/ Please leave comments on that site or you can email them to me. Thank you. [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are

Selective Association?

2006-08-03 Thread Golfer001
What is the correct way to deal with selective association? e.g., I have a 'order' model that belongsTo 'customer', 'product' models. In the list action of Orders Controller, I don't want the 'order' model associated to anybody so I can return all the orders id faster. When viewing the

Re: Special characters from the model and str_replace()

2006-08-03 Thread anarchitect
Okay i got it working now. The result coming from the model/database is encoded as something different then UTF-8. Therefore utf8_encode() will do the job. The thing is i am a bit confused now. The pages rendered by cake are not UTF-8 but seem to be something like ISO-8859-1. I would like to go

Re: Selective Association?

2006-08-03 Thread John David Anderson (_psychic_)
On Aug 3, 2006, at 3:35 PM, Golfer001 wrote: What is the correct way to deal with selective association? e.g., I have a 'order' model that belongsTo 'customer', 'product' models. In the list action of Orders Controller, I don't want the 'order' model associated to anybody so I can return

Comment in Simple User Authentication example is wrong

2006-08-03 Thread ebourqui
Not really a question, but a statement, since I couldn't submit a bug at trac.cakephp.org; The comment in the Simple User Authentication section of the CakePHP manual (as of 8/3/2006) is wrong. It says: // Note: hopefully your password in the DB is hashed, // so your comparison might look more

Re: Websites vs. Web Applications

2006-08-03 Thread Felix Geisendörfer
What's a "full blown website"? Yes, CakePHP can serve static html files alongside with application pages if that's what you are asking for. -- http://www.thinkingphp.org http://www.fg-webdesign.de webbo11 wrote: I am new to using CakePHP. A very light but

Re: Websites vs. Web Applications

2006-08-03 Thread Felix Geisendörfer
What's a "full blown website"? Yes, CakePHP can serve static html files alongside with application interfaces if that's what you are asking for. -- http://www.thinkingphp.org http://www.fg-webdesign.de webbo11 wrote: I am new to using CakePHP. A very light but

HABTM with 3 tables

2006-08-03 Thread [EMAIL PROTECTED]
Firstly, there is already a post about this but it did not help. I'm building a simple little time tracker and there is what I think to be a 3 HABTM association between Projects, Users and Roles as follows: - A Project has many Users - A User has many Roles - A Project has many Roles In

Re: Websites vs. Web Applications

2006-08-03 Thread webbo11
I suppose i meant just a website. Say, that a client comes to me needing a website developed. A 10 - 15 page website with dynamic content a few forms, etc. Would it be better to use procedural programming or a cms such as drupal, or does cakephp work well serving websites.

Re: Re: Websites vs. Web Applications

2006-08-03 Thread Samuel DeVore
heck I even did a essentially static website with all the content stored as markdown styled text and just rendered into a site on the fly. The client then edits the text files that are synced with the server http://www.glicksmanlaw.com/ Sam D On 8/3/06, webbo11 [EMAIL PROTECTED] wrote:

Pages Controller Subpages

2006-08-03 Thread John Zimmerman [gmail]
In the code for the pages controller there are variables there for subpages.Is anyone using static subpages with the pages controller?I browsed around for documentation about it, but came up empty. --~--~-~--~~~---~--~~ You received this message because you are

Another Refresh question

2006-08-03 Thread KN
Hi, In my index page, I have given the sorttable listing along with other views. And each item is an element. And whole elements given in the following way. div // Main div div Element1 /div div Element2 /div div Element3 /div /div And drag-drop things are