A little more information.
I've tried the following:
$this->set('friends', $this->User->Friends->findall('user1_id='.$this-
>User->id));
SQL Error: 1054: Unknown column 'user1_id' in 'where clause'
$this->set('friends', $this->User->Friends-
>findall('Friends.user1_id='.$this->User->id));
SQL Er
Welcome to the world of Cake :) You have no idea how good your choice
of framework was given the multitude of choices out there...
I haven't tested this but it'll be something along the lines of:
$this->set('posts', $this->Post->findAll(null,null,'id DESC'));
also play around with options su
Hey I'm wanting to use Selenium to do some functional testing and want
to use a separate database its own test data (essentially using this
database as a group of fixtures)
I wanting use my urls like : /:controller/:action/:id/selenium
idea being that when /selenium is present then my app => $us
Just add two LMS/LCMS based on CakePHP. :)
Click on
http://groups.google.com/group/cake-php/web/some-solutions-in-the-corner-of-the-world
- or copy & paste it into your browser's address bar if that doesn't
work.
--~--~-~--~~~---~--~~
You received this message bec
On Jan 19, 2008 10:55 PM, Ben Wilson <[EMAIL PROTECTED]> wrote:
> On Jan 16, 2008 5:05 PM, Baz <[EMAIL PROTECTED]> wrote:
> > Yep,
> >
> > Took me a while too. lol
>
> Okay, I bit. I'm trying to get authentication/authorization going for
> a site and am trying your tutorial. Although, I have a tab
I guess I'm misunderstanding also, but what was the problem with
$form->inputs()?
If your using that database, that means model. $form->inputs() dumps inputs
for all the form fields.
--
Kevin Lloyd
3HN Designs
http://www.3HNDesigns.com/
(214) 473-4207
On Jan 19, 2008 3:39 PM, R. Rajesh Jeba Anbia
On Jan 16, 2008 5:05 PM, Baz <[EMAIL PROTECTED]> wrote:
> Yep,
>
> Took me a while too. lol
Okay, I bit. I'm trying to get authentication/authorization going for
a site and am trying your tutorial. Although, I have a table in place
and need to make a few mods. However, with the original table and
Hi, i'm new to PHP and to Cake, definitely a newbie.
I just went thru the Simple Blog tutorial and successfully created the
app. Great.
Now i'm trying to customize it and i'd like to change the sorting
order, it seems to display by ID ... starting with 1, followed by 2,
etc.
How do i reverse th
Thanks!
On Jan 19, 10:59 am, "Dardo Sordi Bogado" <[EMAIL PROTECTED]>
wrote:
> The PagesController is a builtin controller that handles static pages for you.
>
> I suggest you to put it in app/views/pages/about.ctp, then you can
> access it in http:://example.com/pages/about , if you prefer you c
thanks a million everyone!!! :)
2008/1/18 Frobozz <[EMAIL PROTECTED]>:
>
> Thanks for good example! I'm just newbie in CakePHP 8-)
>
> On 18 янв, 18:40, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> > No, you can render any view you want, even you can render no view.
> >
> > if ($inGoodMood){
Ok, i found a solution to this and submitted a diff for it:
https://trac.cakephp.org/ticket/1903#comment:10
This should allow proper pagination of a HABTM associated model on the
main model's view .ctp file
Let me know what you guys think.
On Jan 19, 12:16 pm, fr3nch13 <[EMAIL PROTECTED]> wrot
you could do it both ways technically, but IMO i would go with the
HABTM way and then create a model on the join table and use the 'with'
option in HABTM associations. Example:
class Group extends AppModel {
var $hasAndBelongsToMany = array('User' => array('with' =>
'GroupsUser'));
}
class Gr
Sorry guys - another newbie question.
I've got an install of cake 1.2
I have a users table which I have associated with a usertypes table.
My database setup (cut down for simplicity) is;
create table usertypes (
id int(10) not null auto_increment,
choice varchar(100) not null,
) type = myisam;
On Jan 20, 12:30 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Jan 19, 2008 1:01 PM, R.RajeshJebaAnbiah
>
> <[EMAIL PROTECTED]> wrote:
> >I'm not sure, if you have understand my question. RoR based
> > frameworks allow easy creation/use of form when DB table is created.
> > But, I'm look
Sorry about the misspelling in the subject.
On Jan 19, 9:50 pm, Andreas <[EMAIL PROTECTED]> wrote:
> Hi
>
> I'm trying to invalidate a field in a form with Model::invalidate. It
> works partially, it doesn't continue saving but the error message I've
> defined in my $validate doesn't show up.
>
>
I thought of a different way I could do ratings, I'm pretty new to
CakePHP and I'm not sure if it would be better.
I have users and games. I was going to have a ratings table, users
hasmany ratings and games hasmany ratings. In the ratings table I
would store what they rated the game. I want to
No, there isn't such a key Ticket.item_id
Warning (512): SQL Error: 1054: Unknown column 'Ticket.item_id' in 'on
clause' [CORE\cake\libs\model\datasources\dbo_source.php, line 440]
There's Deal.item_id
Basically a ticket belongs to a deal. A deal has many tickets, and
belongs to one item.
It sho
Hi
I'm trying to invalidate a field in a form with Model::invalidate. It
works partially, it doesn't continue saving but the error message I've
defined in my $validate doesn't show up.
I read somewhere here in the group that his just marks the field as
invalid for saves not for the form helper.
Ah, Chaining was the word I was looking for, but I was thinking that
it would give you only the records from the chained models that were
related to the model of the controller you were in. Thanks for the
info.
So, to do something like what I want to do, I would have to say $this-
>User->Friends
I anser myself at:
http://pvilas.com/?p=67
Thanks to all.
--~--~-~--~~~---~--~~
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 gr
I have an afterSave function inside a model, my two questions are:
#1 How do i use the database prefix?
#2 Do i need to sanitize $data['User']['username'] and $data['User']
['id']?
Thanks in advance.
function afterSave(){
$data = $this->read();
$this->query('UPDATE `bm_aros` SET `alias` = \'
On Jan 19, 2008 1:01 PM, R. Rajesh Jeba Anbiah
<[EMAIL PROTECTED]> wrote:
>I'm not sure, if you have understand my question. RoR based
> frameworks allow easy creation/use of form when DB table is created.
> But, I'm looking for a solution to create forms dynamically--something
> as in LimeSur
On Jan 18, 2008 10:56 PM, aranworld <[EMAIL PROTECTED]> wrote:
>
> But is nate also suggesting that CakePHP developers think it is E-vil
> for us to want to have access to the plaintext version of the password
> during a Model save? Or are we all in agreement that you need to send
> a plaintext v
On Jan 19, 9:55 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> have you checked the FormHelper::inputs() method?
I'm not sure, if you have understand my question. RoR based
frameworks allow easy creation/use of form when DB table is created.
But, I'm looking for a solution to create for
seems like this isn't a new issue:
https://trac.cakephp.org/ticket/1903
On Jan 19, 10:41 am, fr3nch13 <[EMAIL PROTECTED]> wrote:
> I looked over group, blogs, bakery, api, code, etc. and i can't seem
> to figure this one out.
>
> I'm paginating like suggested
> here:http://cakebaker.42dh.com/20
have you checked the FormHelper::inputs() method?
On Jan 18, 2008 1:04 PM, R. Rajesh Jeba Anbiah
<[EMAIL PROTECTED]> wrote:
>
> Has anyone tried to implement dynamic form creation? I'm looking for a
> solution to implement dynamic form creations.
>
> --
>
> Email: rrjanbiah-at-Y!comBlog: h
You are putting:
$this->Ticket->bindModel(array('belongsTo' => array('Item' =>
array('foreignKey' => 'deal_id';
instead of :
$this->Ticket->bindModel(array('belongsTo' => array('Item' =>
array('foreignKey' => 'item_id';
it's a copy and paste error.
HTH,
- Dardo Sordi.
On Jan 18, 20
Thank you very much for getting back to me Dieter!
The salt is definitely "in there" before attemptLogin is called as I
can stick a print_r in Users/login action and I see the salt at the
top of the page when I load the login form. (But the print_r inside
attemptLogin shows it as missing when sub
Chaining isn't bad, but it only gives you a reference for the model,
it doesn't set any conditions. You have to pass them manually to the
findAll().
You can unbind() the models you don't want to get on the findAll and
set the recursion level that fits your needs. Also it is possible to
set condit
The PagesController is a builtin controller that handles static pages for you.
I suggest you to put it in app/views/pages/about.ctp, then you can
access it in http:://example.com/pages/about , if you prefer you can
make a custom route in app/config/routes.php. Go ahead an read:
http://cake-php.
I looked over group, blogs, bakery, api, code, etc. and i can't seem
to figure this one out.
I'm paginating like suggested here:
http://cakebaker.42dh.com/2007/10/17/pagination-of-data-from-a-habtm-relationship/
But where the article ends/is missing is what do you do in your view?
Specifically,
First, if the models are associated, you can
$this->Project->Person->findAll(); (or add the model to $uses) you
don't need to call requestAction(). I suggest you to read:
http://cakebaker.42dh.com/2008/01/19/fat-models-and-how-they-change-how-you-use-the-model-class/
Second, searching on http:/
"Cannot add or update a child row: a foreign key constraint fails", I
think that is clear enough.
On Jan 19, 2008 12:04 PM, dandreta <[EMAIL PROTECTED]> wrote:
>
> Hi!
> I have two tables: Projects and Directors related this way in the
> model:
> - Director hasMany Project
> - Project belongsTo D
Hi!
I have two tables: Projects and Directors related this way in the
model:
- Director hasMany Project
- Project belongsTo Director
Adding a new project I have the field Director who is a simple select
where I can choose the director between all those that I have in the
BD.
Creating a new project
Hi!
I have an HABTM relation between ModelA and ModelB.
In the add view of A, I have created two lists(two multiple selects),
one with all B
elements of the database and other one empty . I pass elements of the
first list to the second one with javascript and the second list will
contain the B el
Hi!
I have 2 tables: projects and persons.
In my ProjectsController I have a function that shows in the view a
list of all the persons of the database. For it I have this:
$this -> set ('persons', $this -> requestAction ('/persons/getpersons
'));
And in PersonsController:
Function getpersons ()
On Jan 19, 2008 5:20 PM, Dave Porter <[EMAIL PROTECTED]> wrote:
> Could some one enlighten me please ?
http://tempdocs.cakephp.org/#TOC112251
If for some reason just cake bake does not work for you then try
../cake/console/cake bake
T
--
==
HI All,
Just checking out Cake - looks interesting - I'm fairly familiar with
Ruby on Rails and just wondering where the generators are ?
I've seen mention of bake.php and/or bake2.php, but they don't appear
to be in the download and I can find little definitive info ?
Could some one enlighten
Yes, have Album belongsTo Defaultphoto.
Defaultphoto is just an alias for Photo - this way you will end up
with Photo_Id in the Album table like Goranche suggested and no
additional hassles
HTH
Tarique
On Jan 19, 2008 5:11 PM, Jaime <[EMAIL PROTECTED]> wrote:
>
> Thank you for the feedback.
Thank you for the feedback. The beforeSave() trick could be one
possibilty, but in this particular case it seems that the
defaultPhotoId suggested by Goranche is the easiest.
On 18 ene, 15:27, Jaime <[EMAIL PROTECTED]> wrote:
> Hello bakers!
>
> Imagine this (common) scenario: a photo album that
> I basically did a
> fresh install of the v0.3 files from bakery.cakephp.org and wanted to
> get them all working as-is before customizing (to make sure there was
> nothing in my project interfering, I grep'd the entire source tree for
> references to 'salt' and only found the new dAuth ones).
W
Nate, Could you elaborate on this?
On Jan 17, 5:42 pm, nate <[EMAIL PROTECTED]> wrote:
> Dude, you're confusing some very unrelated things.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to
Also see
http://groups.google.com/group/cake-php/browse_thread/thread/24196c7482ad2015/57bf84dfab5c910a?lnk=gst&q=pdf+debug#57bf84dfab5c910a
On Jan 18, 9:28 pm, Takuo SHIONO <[EMAIL PROTECTED]> wrote:
> Hello Gianluca,
>
> In may case, we put FPDF into vendors directory. Then we generate
> compo
43 matches
Mail list logo