Can somebody help?
On Jan 4, 3:23 pm, krr <[EMAIL PROTECTED]> wrote:
> php version: 4.4.2
> cake version: 1.2.x
>
> Setup:
> I have a model NFTree, which has a belongsTo relationship to itself
> (parent). The parent can be null.
>
> Problem:
> If parent is null, the parent link displays the below
Hi Robby,
Thanks to reply, but I already done this but still this problem
persist. I have already written in my topic about this.
-pravin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to t
Upgrading is hard. With nightly builds it's usually enough to dump in the
cake folder, however when they make changes to stuff like config.php and
bootstrap.php, etc. then it becomes tricky.
--
Baz L
Web Development 2.0: Web Design, CakePHP, Javascript
http://www.WebDevelopment2.com/
On Jan 6, 200
On Jan 2, 5:54 pm, Bart <[EMAIL PROTECTED]> wrote:
> (i'm a newbe)
> I want my site-visitors to be able after login to download an (audio/
> image)file that is only for them.
> I have two options:
> uploading the files into the database or uploading the files onto
> the server in a folder with f
On Jan 4, 7:59 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Jan 4, 2008 2:02 AM, R. Rajesh Jeba Anbiah
>
> <[EMAIL PROTECTED]> wrote:
> >http://groups.google.com/group/cake-php/msg/300bec44c5902198
>
> I read the post above, so let me see if I understand this correctly.
>
> 1) People should
I don't get it.
Are the sessions in the database in plain text? Aren't they encrypted like
when they get written to disk? How would you retrieve user information?
Also, using the Session component, doesn't only call up local sessions?
Interesting problem though.
On Jan 6, 2008 11:01 PM, Robby An
I have untar everything and I noticed that in the application folder,
a few things changed.
I was upgrading from 1.1.x.x to 1.2.x.x
I had to go through quite a number of changes as some functions were
deprecated.
--~--~-~--~~~---~--~~
You received this message be
When you set up a table with char(36) as the id field normally cake
will handle the generation of the ID's but if you use this in a
scaffolding situation it does not... you get a sql error.
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Hi, I'm often getting this error whenever I use the FormHelper.
I'm using CakePHP v1.2.0.6311 beta.
Warning (2): array_key_exists() [function.array-key-exists]: The
second argument should be either an array or an object [CORE\cake\libs
\view\helper.php, line 344]
In my view, this is how I use
Duh. Much simpler way. (And isn't there usually?)
To see if a session is new, just look for a specific "new session"
session variable in your controller (or app_controller) afterFilter()
method. If it doesn't exist, then you know this is a new session, and
you can do whatever additional sessions
I think francky is right, both on the syntax (don't include the
".thtml") and that render() only works within the same controller.
So, you're posting from the Questions controller to the Survey
controller, correct? And I'd bet you don't just want to redirect on
that last validation, because you
Hey everyone,
I'm trying to generate a list of employees and in that list I want to
show the customer which that employee belongs to. In my db I have an
employees table and a customers table and each employee has a
customer_id field. The problem is, I want to show the customer.name
field, not t
If you want localization of your validation error messages then it is
best to define them in the views rather than the model - model just
gives the type of error to the view and view sorts out what it needs
to show for that error - that is the proposed 'CakePHP' way to do it.
HTH
Tarique
On J
Hey gwoo, you are right. I had commented out an association in my
customer_model, when I uncommented it and took out the var $uses, it
still worked.
thanks for the help
On Jan 6, 5:53 pm, gwoo <[EMAIL PROTECTED]> wrote:
> No you do not need var $uses if you have associations. $this->Employee-
>
The easiest way is to create a Session model and point it to your
session table. Then you can use all the normal Model methods and
report on active sessions.
If you wanted more information about the session, you could go for a
more complex option (which is what I was researching tonight,
coincid
Great!
You've helped me so much!
Especially the link options that look like "__('Download this file',
true) " did it. Didn't have the chance yet to dig into those details.
For the other newbes:
Make sure you don't print anything (with e.g. "pr()" ) before you
start sending headers+the file because
there should be nothing in the app directory that would overwrite your
current app.
--~--~-~--~~~---~--~~
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 u
No you do not need var $uses if you have associations. $this->Employee-
>Customer will work just fine.
--~--~-~--~~~---~--~~
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
Can anybody help?
--~--~-~--~~~---~--~~
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 m
OK I've found the problem and the fix...
It's caused by the version of MySQL - in v5.1 the default SQL mode is
STRICT_TRANS_TABLES which causes this error. If you remove this
setting from the MySQL config it will let you use '' instead of NULL
and the Cake code works OK.
Ben
On Jan 6, 7:26 pm,
Hi all, I'm working in a project in which I need to get a listing of
users who are currently logged in (or active for the past x mins). The
sessions data is being stored in the sessions table in the database
and I'm also using othAuth.
I appreciate any tips on how to do this.
Thanks a lot,
Joe
Hi all, I am working in a project in which I need to have a list of
all users who are currently logged in and/or have been active for the
last x mins. I'm saving the session data in the database. This could
be used as part of a friend activity feature or something similar.
Is there a nice clean w
Should I just untar the /cake directory? I have some modified files
in my current /apps directory that I don't want replaced.
Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to thi
Are you using cake1.2 ? If your href is linked to a combo choice, why
not make a property on the combo (ie : 'onChange' =>
'gotoUrl(\'this.selected\')') ? I do not see why the your js function
will be executed as it is now ... You have to set the event in the
combo itself, or add a js event "catch
Maybe :
$this->redirect('/questions/index'); instead of
$this->render('questions/index.thtml'); gives better results ? You
can render another view, with same controller, for another controller
using redirect is better (also in cake 1.1 add an "exit()" after the
redirect). I am not
Thanks but have a slight problem :-)
My save function is:
class SurveysController extends AppController
{
function save()
{
if (empty($this->data))
{
$this->render();
}
else
{
if($this->Survey->save($this->data))
{
On Jan 6, 2008 7:07 PM, cybercow <[EMAIL PROTECTED]> wrote:
>
> Just using this framework for php, and can`t get it work properly. 99%
> of chances are that is something about Solaris-specific.
I'm running some large scale intranet cakephp 1.2 apps in very similar
environments and
trust me when
Thanks. I was able to get it. That helped alot!!!
On Jan 6, 1:57 pm, polutan <[EMAIL PROTECTED]> wrote:
> add this in your controller
> var $uses = array('Model2','Model3');
>
> or if not working try to
>
> var $uses =
> array('YourCurrentModelName','Model1','Model2','Model_etc');
>
> for your
that worked. thanks alot!
On Jan 6, 1:39 pm, Robby Anderson <[EMAIL PROTECTED]> wrote:
> Try adding the false value to the label key in the second parameter,
> like this:
>
> input('Employee/name',array('label' => false));?>
--~--~-~--~~~---~--~~
You received this
You guys are both awesome. Saved me a ton of head ache. Thanks!
On Jan 6, 2:53 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Jan 6, 8:18 am, Gene <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have the following function being called multiple times in a
> > controller:
>
> > function _link_node($lat
Hey Robby,
On Jan 6, 1:53 pm, Robby Anderson <[EMAIL PROTECTED]> wrote:
> @nate - Thanks for the response. I wasn't necessarily fishing for your
> reasoning, but I appreciate you taking the time and stating it
> explicitly nonetheless. I still find it slightly inconsistent that you
> can configur
Check out the controller->render() method.
http://api.cakephp.org/1.2/class_controller.html#90046e6b62c91452a987c9573372c2ac
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group,
Hello. I'm new to the Cake PHP framework but have been using PHP for
years. I'm having trouble understanding the behavior of my app after
data validation. Here's the set up:
I have a 'questions_controller' that simply pulls up a dozen questions
from a database. These questions are displayed in a
I have it, I forgot this line link=window.location.href;
so when I make alert I have http://localhost/myprojet/index.php/myusers/4
but still nothing :(, I even try to do window.location.href="http://
www.google.com"; - nothing I also try window.location="http://
www.google.com"; with out result
-
add this in your controller
var $uses = array('Model2','Model3');
or if not working try to
var $uses =
array('YourCurrentModelName','Model1','Model2','Model_etc');
for your case. did you want to access Customer model in
employees_controller ?
just add :
var $uses = array('Customer');
or
var $u
Try adding the false value to the label key in the second parameter,
like this:
input('Employee/name',array('label' => false));?>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this gr
Hi,
Just got back into using Cake after some time away from it (and PHP
development in general) I want to knock up an app very quickly so I
want to use the scaffolding. I have a very simple table, model &
controller defined but when I come to add an item I always get this
error:
SQL Error: 1366:
Hi,
Just got back into using Cake after some time away from it (and PHP
development in general) I want to knock up an app very quickly so I
want to use the scaffolding. I have a very simple table, model &
controller defined but when I come to add an item I always get this
error:
SQL Error: 1366:
Hey everyone,
I'm trying to style a form a certain way and need to be able to style
a label, so I am using the following code
label('Employee/name','Employee Name',
array('class'=>'prefield'));?>
input('Employee/name',array('label'));?>
The problem is, is that the $form->input is still generati
Just using this framework for php, and can`t get it work properly. 99%
of chances are that is something about Solaris-specific. first try was
on earlier solaris 10 / 06 version then after on last solaris 10
08/07. php version used is 521 and 525, mysql is 5045, both
combinations produced same resu
You need to pass FULL_BASE_URL as parameter and build your link with
it ...
You could set in the head section a js var and set it to
FULL_BASE_URL. Use this var and concatenate your location from combo.
hth
On Jan 6, 7:20 pm, cinias <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have a problem with Ca
Hi everyone,
I have two models, Employee and Customer. Employee belongsTo
Customer. I want to have a view Employee/index/customer_id where I can
have a table view of all employees that belong to a certain
customer.
How would I go about calling the Customer Model to genrate a data set
that lists
@nate - Thanks for the response. I wasn't necessarily fishing for your
reasoning, but I appreciate you taking the time and stating it
explicitly nonetheless. I still find it slightly inconsistent that you
can configure so many aspects of a model (such as table name, primary
key, foreign keys and d
Hello,
I have a problem with CakePhp and window.location. On view
index.thtml I have a js function and code
function goToUrl(link)
{
var id;
var cb1; --this is combobox/select
cb1=document.getElementById(''combo_id');
id=cb1.options[cb1.selectedIndex].value;
Hello,
I have a problem with CakePhp and window.location. On view
index.thtml I have a js function and code
function goToUrl(link)
{
var id;
var cb1; --this is combobox/select
cb1=document.getElementById(''combo_id');
id=cb1.options[cb1.selectedIndex].value;
Thanks so much Williamg! I understand now!
I'm going to try this out tonight and let you guys know how it goes.
If I create any good code out of it I'll be sure to share.
Thanks so much,
daniel
On Dec 26 2007, 2:44 pm, Williamg <[EMAIL PROTECTED]> wrote:
> Hi Daniel, if you use the link I sent
On Jan 6, 10:05 am, Robby Anderson <[EMAIL PROTECTED]> wrote:
> cake is), but doesn't help scaffolding (which is admittedly pretty
> minor). I find the attached quote interesting ('Whereas we '...try to
> live by "convention over configuration"') - when you can change so
> many other database nami
Installed new beta (was using the pre-beta) today!
Is there a change in the Save method, or just in the dbo source, when
I try to update a model now, the query uses a join with his
'belgonsTo' models.
Generating a query like: UPDATE posts Post LEFT JOIN blogs Blog on
(Post.blog_id = Blog.id) SET
I still have my problem, and when I print the content of $this->params
with: "pr($this->params)" in the app_controller, the $this-
>params['week'] and $this->params['year'] still contains the same
value (the week value).
I have managed to access the year value with $this->params['pass'][0],
but I
This is the way I handled it :
http://groups.google.com/group/cake-php/browse_thread/thread/fa32c81acc043eef/6a49c6d9fdc6f158?lnk=st&q=#6a49c6d9fdc6f158
On Jan 6, 3:57 pm, Jonas Roslund <[EMAIL PROTECTED]> wrote:
> I have a very similar problem. I think it might have to to with the
> fact that y
So, extrapolating nate's beforeSave() suggestion in the ticket
(thanks, nate!) into something that can be added to my app_model.php
file to be usable globally (and with some slight refactoring from my
initial design, making the properties simply strings instead of arrays
since I don't have to wor
That would seem to be the best way to do it. Something like this,
maybe:
function afterFind($results) {
if ( isset($results['quantity']) and isset($results['unit_price']) )
{
$results['calculated_price'] = $results['quantity'] *
$results['unit_price'];
}
I've put "clearing the cache" on the top of my list of things to do
before I go into "oh crap" mode. :) Seems to solve all kinds of
problems. I keep meaning to create a small script to do it and then
call the script from my server start script, among other places.
--~--~-~--~~--
I have a very similar problem. I think it might have to to with the
fact that you are using a function in the declaration of the variable.
I also want to use i18n to create the message. Please let me know if
you solve the problem.
Regards,
Jonas
On Jan 5, 12:42 am, "[EMAIL PROTECTED]" <[EMAIL P
@Lunar - Thanks. I had considered triggers. I was hoping to take
advantage of Cake's capabilities. Thanks for the link, too - some good
stuff there and at that site.
Hmm. Ticket got closed pretty quickly. Guess I'm not the only one
working at 2 AM on a Saturday. :) The dev's given solution for t
Or you can pass the Session component to your model function as
parameter, so that you can access this component from there,
In your Controller,
$this->YourModelName->yourModelFunction($this->session)
And in your Model function
function yourModelFunction($session)
{
$session->setFlash('blah bl
You don't mention what DB Server you are using so I'll preface this
with this solutions only works with db's that support triggers.
This sounds like a problem with the DB not necessarily with cake,
However I would agree that it would be nice to have some variables you
could specify these fields n
How can i have a calculated attribut in a model.
My example : i hava a shopping_cart_product with 2 attributs :
quantity and Unit_price and i want a calculated_price witch is
quantity*Unit_price (without store it in database)
Can I try an "afterFind" function ?
--~--~-~--~~-
Hello who can help me out? I searched the group but can't find or
understand ;-) de current answers.
I use the pagination script by AD7six and try to use it with a custom
query like this in the controller.
$criteria= $_GET['id'];
list($order,$limit,$page) = $this->Pagination->init($criter
How can i have a calculated attribut in a model.
My example : i hava a shopping_cart_product with 2 attributs :
quantity and Unit_price and i want a calculated_price witch is
quantity*Unit_price (without store it in database)
Can I try an "afterFind" function ?
--~--~-~--~~-
Not my own server, it's a webhotel so i can't restart it if that was
what you meant.
Tried clearing out my cache and that worked perfectly! Thanks for the
help!
I do have some custom routes but nothing with regexp and it shouldn't
interfere with this.
Everything works now, clearing the cache fi
I solved my problem, it was because I have a function __construct in
my app_controller, and I'm checking $this->params['language'] in the
function __construct.
Moved code to app_controller beforeFilter, and $this-
>params['language'] is set.
--~--~-~--~~~---~--~~
Then you should check some tutorials, on this page :
http://groups.google.com/group/cake-php/web
Items 2 and 3 are good starting points. There are others, make a
search on blog tutorial (I am not up to date concerning it).
On Jan 6, 12:55 pm, Novice <[EMAIL PROTECTED]> wrote:
> Oh, I think i wa
Oh, I think i was not clear with my question. I actually want a sample
site with its source code so that i can study it and see the practices
using the cake php frame work
Thanks.
On Jan 6, 3:59 pm, francky06l <[EMAIL PROTECTED]> wrote:
> Here is a list of apps / site built with cake :
>
> http:
http://cake.insertdesignhere.com/posts/view/20
--~--~-~--~~~---~--~~
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
Here is a list of apps / site built with cake :
http://groups.google.com/group/cake-php/web/cake-apps-sites-in-the-wild
On Jan 6, 11:41 am, Novice <[EMAIL PROTECTED]> wrote:
> Hello Guys,
>
> I am new to cake php. Is there any place where i can find a sample
> website built in cakephp.
>
> Thank
Maybe this will help :
http://groups.google.com/group/cake-php/browse_thread/thread/fa32c81acc043eef/6a49c6d9fdc6f158?lnk=st&q=#6a49c6d9fdc6f158
On Jan 5, 6:09 pm, AG <[EMAIL PROTECTED]> wrote:
> It seems the routines for i18n and l10n don't work in the model file
> environment, if that makes an
On Jan 6, 8:18 am, Gene <[EMAIL PROTECTED]> wrote:
> I have the following function being called multiple times in a
> controller:
>
> function _link_node($lat, $lng, $line_id){
> $result = $this->Node->query('SELECT COUNT(*) FROM
> nodes');
> var_dump($res
On Jan 5, 6:21 pm, MikeK <[EMAIL PROTECTED]> wrote:
> I moved some code from a controller to the model, and the code set
> some flash error msgs using the session component setFlash call.
>
> I didn't realize it wasn't working until someone triggered the error
> today -- is there any way to make
Hello Guys,
I am new to cake php. Is there any place where i can find a sample
website built in cakephp.
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email t
Send false as the second parameter to your query method. This will
prevent caching of the query.
On Jan 6, 5:18 pm, Gene <[EMAIL PROTECTED]> wrote:
> I have the following function being called multiple times in a
> controller:
>
> function _link_node($lat, $lng, $line_id){
>
Thanks a lot. I should have thought about the tempdocs ;)
--~--~-~--~~~---~--~~
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
72 matches
Mail list logo