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
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
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
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
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
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
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
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
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
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,
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
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 :
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
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
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
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,
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
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
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
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
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
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...
@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.
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
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
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
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
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
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
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
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
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.
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:
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
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
35 matches
Mail list logo