class User extends AppModel
{
var $name = 'User';
var $primaryKey = 'username';
var $hasMany = array ('Equipment'=>
array('className' => 'Equipment',
'conditions'=>
'Equipment.owner='$logged_in_username', >how do I get this
va
HI,
I have 2 models
User and equipment(the owner is a field in the user table).
user hasMany equipment
equipment belongsTo user
equipment hasOne owner.
I need to display all equipment that a user owns when he logs in.
Even if I were to specify it in the conditions part of the association
how d
Can anyone suggest how I could have a recursive delete (aka dependent)
join between two tables?
IE Posts HABTM Tags
If a post is deleted all tags associated with that post are deleted
If a tag is deleted all posts associated with that tag are deleted
I know it seems like a strange thing to
I had a similar sounding problem - mine turned out to be that that I
was redirecting to a slightly different domain name - in my case I was
loosing session data when I redirected from http://www.domainname.com
to say https://domainname.com (no www in domain name). Bottomline is
make sure your doma
On 5/26/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote:
>
> You sound grumpy.
>
Grumpy is the new Good :P
T
--
My motto for everyone else - "Just shut up, damnit!!"
=
PHP for E-Biz: http://sanisoft.com
===
to create a master detail you create your models for example
Models/master.php
array(
'className'=>'Detail',
'foreignKey'=>'id_master')
);
}
?>
---
Okay, seriously, why are people sooo ignorant about this issue???
There is nothing, no thing, not *anything* preventing you from writing
PHP5-only apps with Cake, even though we support PHP4. The one and
only thing you *cannot* do with a Cake app is run it in E_STRICT
mode. That's it, that's al
I've been pouring over all the posts I can find about session data
being lost between requests and trying many things to no avail. I
know my sessions are working having tried small scripts posted here as
well as my own.
The session data is being set before the redirect but not there
afterwards (
Check out the NiceHead Helper in the bakery.
On May 12, 12:53 pm, dom <[EMAIL PROTECTED]> wrote:
> Hi everybody.
> I wonder if it is possible to load a javascript file outside the
> section of the layout. I have only one layout, default.thtml,
> as all the calls are Ajax calls. So I have only on
Not claiming any beauty, efficiency or adequate testing here... :
http://bin.cakephp.org/view/1976615209
This includes henthoca's beforeFind check as well.
@see
http://groups.google.com/group/cake-php/browse_thread/thread/d4aa1929ce4d61c7/edcacb9354ff1f7a
I've assumed a default of "{first_name}
On 5/25/07, Mech7 <[EMAIL PROTECTED]> wrote:
>
> When will CakePHP be turned to PHP5 code?
>
You can build CakePHP apps with PHP 5 already.
--
Chris Hartjes
My motto for 2007: "Just build it, damnit!"
@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart
When will CakePHP be turned to PHP5 code?
--~--~-~--~~~---~--~~
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 t
When will CakePHP be turned to PHP5 code?
--~--~-~--~~~---~--~~
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 t
AD i downloaded and started working with the pagination class. Do you
think there is a way to mod it to give me a a search box at the top.
I'm looking for something like:
Drop Down Box Of Fields | Drop Down of Operators | Text box for search
critera | Search Button
--Bryan
On May 9, 4:04 am, A
It turns out that the documentation at
http://manual.cakephp.org/chapter/installing
is wrong - you have to add RewriteBase /~username/ to both
the .htaccess as the root and in /app/webroot, wheras the
documentation says to only include it in the root .htaccess. I'm not
sure how to get it changed,
Wow Felix! Didn't think of that one yet. That's actually a very smart
way of achieving exactly the functionality I wanted, with all the
benefits of the design I wanted. Actually, since a model class in
CakePHP will never have more than one instance (at a time) using
static methods is practically i
Currently, I am running from /b13ed.com/app/webroot/. I used your
suggested .htaccess and no improvement. Any other ideas?
Thank you!
On May 25, 10:43 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> is your document root set to your cake folder, or cake/app, or cake/
> app/webroot?
>
> Try
I believe so, I am running Wordpress on the same server; and using
mod_rewrite for "pretty" URL's.
Sample referred to above: http://www.wercshop.com/2007/05/22/ben-blogged/
On May 25, 8:35 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On 5/25/07, Merc <[EMAIL PROTECTED]> wrote:
>
>
>
> > Ye
You sound grumpy.
-MI
---
Remember, smart coders answer ten questions for every question they ask.
So be smart, be cool, and share your knowledge.
BAKE ON!
blog: http://www.MarianoIglesias.com.ar
-Mensaje original
Hey guys,
I've been working with gwoo on another shell to add to the growing
collection you can access via the command-line. I've posted a
screencast to my blog of me giving a very quick demonstration of it.
http://www.littlehart.net/atthekeyboard/2007/05/25/screencast-interactive-console-for-c
You can load scripts from within your views, too. I'm playing with
ajax, jquery, and ext.js, and I had similar problems. Put something
like this at the bottom of your view:
link('myScript.js'); ?>
NOTE - you have to but this at the bottom of the view. I tried
putting it at the top, but the sc
I use to load javascript files on the fly using a **synchronous** connection
(using XMLHttpRequest)
sUrl="http://example.com/scriptftoload.js";;
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
if ( typeof xmlhttp.overrideMimeType != 'undefined') {
xmlhttp.over
Thanks for that.. hadn't see it before.
It seems interesting, but I'm not sure it's exactly what I'm looking
for. It seems well suited for making models observable to components
and the like though.
It seems logical that if several models are associated with one
another (ie: the model PartyParti
The Head helper is non existant. Do you have a custom helper that you
are using?
Thanks,
John
On May 12, 11:08 am, stacey <[EMAIL PROTECTED]> wrote:
> You can call like this from the view:
>
> js('customborders/cb'); ?>
>
> and you need to include the 'head' helper in your controller:
>
> var
I've been attempting to follow the blog tutorial, simply to see what
Cake entails, but I'm finding that I can't get the URLs to work - I
keep getting 404's. I'm fairly sure it's a mod_rewrite issue, but it
appears to be working normally.
I have cake installed to ~/public_html/. If I put a file, e
is your document root set to your cake folder, or cake/app, or cake/
app/webroot?
Try setting it to:
cake/app/webroot
and then change your .htaccess file (cake/app/webroot/.htaccess) to:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
Rew
Look over at htaccess statements.
You can simply create an .htaccess file on a folder (inside webroot) and
then add there:
Order allow,deny
Deny from all
And you won't be able to access that directory through apache (hence through
a browser), so you'll be left with readfile() and stuff from PHP
oh ok, sorry never noticed this post you had left, i reposted under a
new topic. i'm newer to cake, is there somewhere's you might be able
to direct me for more information? ie. tutorial or example.
On May 25, 11:29 am, francky06l <[EMAIL PROTECTED]> wrote:
> If you have installed your applicat
I'm working on an app where a an end user needs the ability to upload
mp3 files to the server (basic i know). then, it will become
available to purchase via a pay-per-download. all of the concepts of
downloading, pay-per-download are pretty straight forward and aren't
really an issue.
the chall
AD7six escreveu:
> No idea. but as I develop with both php4 and 5 I am pretty sure it is
> not specific to the (aging) pagination code. Sounds like more
> debugging is needed ;).
>
> Cheers,
>
> AD
AD,
Boy I *really* hoped for a reply like "this is a simple issue, just do
Pagination->foo = 'ba
On 5/25/07, Merc <[EMAIL PROTECTED]> wrote:
>
> Yes, sir. Mod_rewrite is running and set-up as directed. Is there a
> test file or test project available that can help me to troubleshoot?
> The biggest issue is that I am not getting a helpful error message.
>
I know it's a silly question, but do
Hi Luke,
Have a look at this http://bakery.cakephp.org/articles/view/threaded-lists
atricle it think it will cover what your wanting, there is also this
article.
http://bakery.cakephp.org/articles/view/coding-a-self-join-in-a-cake-application
Penfold
On 25 May, 12:00, luke BAKING barker <[EMA
Yes, sir. Mod_rewrite is running and set-up as directed. Is there a
test file or test project available that can help me to troubleshoot?
The biggest issue is that I am not getting a helpful error message.
--
.htaccess file
-
I don't think so. I think it is not a normal behaviour that you can't
made a find and a save just after without lose some data.
Is it normal that the date format of the find() is not the same that
the date format of the save() ?
If Yes, where is defined the date format of the find ?
If i have a
sorry just post 2 times with the logon of a friend :(
--~--~-~--~~~---~--~~
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,
If you have installed your application outside the public_html (it
should be) you can use some of the cake php variables to access your
files (ie : APP_DIR etc ...)
On May 25, 3:59 am, rockit <[EMAIL PROTECTED]> wrote:
> ya that's what i'm thinking.
>
> i was thinking of placing the area that sto
I've seen models that don't use a database table too, but an example
of how to load in data (say the apples and oranges are the result of
some kind of search) into a model for pagenation would be helpful.
Zoltan
On May 25, 3:29 am, AD7six <[EMAIL PROTECTED]> wrote:
> On May 24, 5:01 pm, gmwebs <
On 5/25/07, Merc <[EMAIL PROTECTED]> wrote:
>
>
> I would be grateful for any direction that will help my to
> troubleshoot the issue.
Is mod_rewrite enabled for your site? Please follow the installation
and configuration instructions in the manual very carefully.
--
Chris Hartjes
My motto fo
On 5/10/07, Ming <[EMAIL PROTECTED]> wrote:
> Is this var ($name) mandatory? In view, I have ['id']; ?>. Does ['Post'] here refer to the $name var?
I'm sorry, but you are a help vampire(1) if I ever saw one. I suggest
the following:
1) learn about PHP 4's object model since that is what CakePH
On 5/25/07, yannouz <[EMAIL PROTECTED]> wrote:
> If i execute a save directly after that : $project->save($data)
> The begin date is replace in the database by 1970-01-01 00:00:00
> because 21/02/07 is not valid, the system need a d.m.Y format date.
>
> The original code was not made by me, so may
> If i execute a save directly after that : $project->save($data)
> The begin date is replace in the database by 1970-01-01 00:00:00
> because 21/02/07 is not valid, the system need a d.m.Y format date.
Ho sorry i made a mistake, the last sentence is "the system need a
m.d.Y format date"
--~--
I´m trying to develop a menu based on a Categories tables. The
elements of the menu are in a tabla called Items. In Items table there
is FK categories_id to relate each item with his category.
I want to show something like this
Category 1
Item 1 C1
Item 2 C1
Category 2
Item 1 C2
Item 1
Hello All,
I'm pretty new in the Cake world so excuse me if my question is a noob
one, but i haven't find any similar question.
I will simplify my example to be understandable :
My Oracle Database have a Projects table which contains some data and
a begin_date field which is a date
id|
Hi
So in cake 1.2 I am wanting to bake my model for a db table Links,
which will basically hold navigation menu items and their subitems
(via using parent_id)
[ I want to build a tree menu for navigation from it , essentially. ]
So links has fields id, parent_id (default 0), path, name, and
pri
Here is one of my favorite approaches to this is do use static function
calls on Models:
-
class User extends AppModel
{
function name($user)
{
if (isset($user['User']) {
Yeah, but how would a model that doesn't use db tables present data
for Paginate() to use? Sorry if this is an obvious question, but I am
seriously not getting this concept :(
Thanks,
Graham
On 25 May, 08:29, AD7six <[EMAIL PROTECTED]> wrote:
> On May 24, 5:01 pm, gmwebs <[EMAIL PROTECTED]> wro
I have a work around, but I had to add in a route for each product
group. It is working now though...
As for the reason behind making the pages static, they only have 8
products and they just want an exact copy and paste from the old to
the new site. Also, they want to be able to edit the xhtml t
On May 24, 10:21 pm, squidliberty <[EMAIL PROTECTED]> wrote:
> Fabulous! That works perfectly for most of my queries. But why won't
> it work in the following?
>
> $conditions['NOT'] = array('Listing.expiration' => "BETWEEN 1 AND
> ".mktime());
> $conditions[0]['OR'] = array("Listing.title" => "
On May 21, 10:35 pm, Kurt <[EMAIL PROTECTED]> wrote:
> Hi, i use one view file for many controllers. This view saved in views
> folders and into the controllers i uses:
>
> $this -> render('../anyViewFile');
>
> this works well in my localhost with easyphp 2.0(with PHP5), but when
> I upload to
On May 21, 10:35 pm, Kurt <[EMAIL PROTECTED]> wrote:
> Hi, i use one view file for many controllers. This view saved in views
> folders and into the controllers i uses:
>
> $this -> render('../anyViewFile');
>
> this works well in my localhost with easyphp 2.0(with PHP5), but when
> I upload to
On May 22, 1:05 am, gmwebs <[EMAIL PROTECTED]> wrote:
> How do I configure the following? I am using 1.2.0.5137
>
> I want to organise my static pages in subfolders so that views/pages/
> products/product1 points towww.mydomain.com/products/product1.
it does that as it comes out of the box, unl
On May 22, 8:51 pm, Fluxx <[EMAIL PROTECTED]> wrote:
> I have a script that downloads an mp3 file off my server. If I throw
> the code inline in to a PHP file and run it, the mp3 file downloads
> just fine and plays happily in iTunes, WMP, etc. If I take that same
> code, and put it in a funct
On May 23, 4:41 pm, Repsah <[EMAIL PROTECTED]> wrote:
> Yes, I was thinking as well about using a component but I wanted to make
> sure this was the wisest choice.
> I'll need a whole lot of them ;)
Maybe useful http://www.noswad.me.uk/MiBlog/MiniControllers
hth,
AD
--~--~-~--~~
On May 23, 4:48 am, hostdesigner <[EMAIL PROTECTED]> wrote:
> Like know how paginate results of search with cakePHP, I know do with
> PHP, but in cakePHP...
>
> Thanks!
There's an example in the 1.1 pagination demo which is available here:
http://cakeforge.org/projects/noswad . The exact same p
On May 24, 4:46 pm, "Gonzalo Servat" <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I've noticed this behaviour only when debug = 0 (ie. production mode). I had
> an Ajax call that worked fine in dev but failed in production. After lots of
> troubleshooting, I looked at the Apache logs and noticed tha
On May 24, 5:01 pm, gmwebs <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Is there any way to paginate data other than Model records using the
> Paginator helper? For instance, I want to paginate an array, not the
> actual Model records.
>
> Something like:
>
> Pseudo Code *
>
> var $paginate = a
On May 25, 4:10 am, Bernardo Vieira <[EMAIL PROTECTED]> wrote:
> Hi all!
> I have a project that uses the Pagination component. It works perfectly
> in my development environment, however when I uploaded the project to
> the production server things went sour. The component seems to do it's
> jo
On May 25, 7:10 am, alan <[EMAIL PROTECTED]> wrote:
> https://trac.cakephp.org/ticket/2640#preview
>
> The new method in router.php is: stripEscape($param) The way it's
> currently written, it can run into problems with highly nested
> arrays basically it assumes that there's a text value in
On May 25, 6:36 am, chewie124 <[EMAIL PROTECTED]> wrote:
> I have an ajax driven form in cake, that works like a champ. it's
> really pretty simple: When you submit the form, it sends the request
> to the controller and then updates the div containing the html form
> with the response from the
On May 24, 11:56 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On 5/24/07, Kamik <[EMAIL PROTECTED]> wrote:
>
>
>
> > any idea?
>
> Bumping a post is considered bad manners on this list. Be patient, if
> someone has an answer for you they will post it...
Yeah. especially on the same day.
K
On May 10, 5:02 pm, Ming <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I am new to cake and I have several questions. :)
>
> >From the blog tutorial:
> 1)
> //AppModel gives you all of Cake's Model functionality
> class Post extends AppModel
> {
> // Its always good practice to include this vari
61 matches
Mail list logo