Hello !
I'm in a dilemma.
I have the following tables:
CREATE TABLE `langs` (
`lang_id` tinyint(3) auto_increment,
`abrev` varchar(32),
`name` varchar(32),
PRIMARY KEY (`lang_id`)
)
CREATE TABLE `seasons` (
`season_id` smallint(5) auto_increment,
`year` varchar(16),
This is great, i only recently showed this
(http://forums.devnetwork.net/viewtopic.php?t=38810) to crazylegs (this
tutorial isn't written for cake, but for php in general), cause i
thought it would be something he might want to implement in othauth.
it's a really neat system, i really recommend
I'm trying to solve a minor problem:
I would like to maintain an history fo INSERT, UPDATE and DELETE
commands. Among my tables, I have an history table, such as this:
CREATE TABLE history(
id SERIAL PRIMARY KEY,
who VARCHAR(32),
action VARCHAR(10),
parameters
I would bet on HABTM
class Season extends AppModel {
var $hasAndBelongsToMany = array (
'Lang' =
array('className' = 'Lang',
'joinTable' = 'seasons_langs'));
}
class Lang extends AppModel {
var
Thanks for the answer.
I have two questions on it:
1. I need to add an array item in Langs for every table that use langs,
right ?
2. 'seasons_langs' has a third filed 'info', which actually holds the
specific language information (for the other tables there could be more
such fields). How am I
I don't think these exist in cake, I am defining arrays with common maps for in my app_controller. I access them with $this-genderArray or something similar. I should probably do something different but this works for me. A helper would probably be better so I would have to initialize the arrays
Dolorian wrote:
Thanks for the answer.
I have two questions on it:
1. I need to add an array item in Langs for every table that use langs,
right ?
2. 'seasons_langs' has a third filed 'info', which actually holds the
specific language information (for the other tables there could be more
For the moment I think having two queries - one to return the
individual user permissions, and one to return those gained through the
groups - is the right way to go.
The SQL I have managed to write to get the permissions for the
usergroups that a user is part of is this, for anyone who is
On 8/31/06, MrTufty [EMAIL PROTECTED] wrote:
The SQL I have managed to write to get the permissions for the
usergroups that a user is part of is this, for anyone who is
interested:
SELECT permissions, type
FROM permissions
LEFT JOIN usergroups_permissions
ON
Hi,
Sorry that I have not respondend! I have been very busy with work the
last week.
Ralph: Thank you for your detailed answer! I will defiantly look at
full text search later! Your exampled helped me understand the cake
controller better :)
Sohei: There is a missing ) in the first line after
Hi all,
This all seems a bit like reinventing the wheel to me ;)
Have you tried the cake db_acl solution?
A great benefit of using the cake acl is the MPTT implementation - as
soon as you have more than a trivial number of aros or acos you will
probably find that, using what you have described
Hi!
I was having similar problems to this and managed to fix it with the
following snippet!
First determine the name of the input field you wish to focus. Its name
will be of the form YourModelNameSearch. Use view source for the
avoidance of any doubt and then try adding
echo
Tnx bitrace. bake on2006/8/31, bitrace [EMAIL PROTECTED]:
Hi!I was having similar problems to this and managed to fix it with thefollowing snippet!First determine the name of the input field you wish to focus. Its namewill be of the form YourModelNameSearch.Use view source for the
avoidance of any
Hi there !
New to Cake, I discover the framework. I currently use Rails also.
Is there a reason for find/findAll methods to return an array, rather
than an object (instance of the model class) ? Is there other methods,
not documented, returning object rather than array ?
If returning an object
stevenL wrote:
Thanks. Of course I read the manual. Over and over...
I was previouswy installing Cake inside the Sites folder.
So I am trying your method of placing a folder for cake inside
/Library/WebServer/Documents. When I visit the cake index file there
it's the same problem, I get
Tony,
I agree, the retuning of arrays doesn't support good object-oriented
practices. But arrays are extremely flexible and easy to work with in
PHP, so that's probably why the developers chose to use them in
CakePHP. Version 2 of Cake, however, is supposively going to completely
change the way
Living in jsp world I was happy using displaytag
http://displaytag.sourceforge.net/11/ library. Now trying to live in
cakephp world and looking for such flexible tool/library for displaying
and formatting table data. Suggestions?
--~--~-~--~~~---~--~~
You
Hi all,I'm about a week into sing cake and like what I've been able to do so far.However, I'm currently a t the early stages of developing a reasonable sized nightlife listings site. And I'm not sure i can achieve everything i need with cake.
Basically I'm confused about mixing data from numerous
Also look at the query caching - If you've already queried the model
before (maybe in a seperate controller using requestAction), if you
make the two queries the exact same cake automatically eliminates one
whole query due to caching.
Because of this, it is occassionally faster to make a
I had no problem setting up cake under OSX. The cake core resides in
~/Library/cake and the apps in ~/Sites. I am using the PHP Package
from here[1] and the offical MySQL for Mac. The only thing you have to
look for is the permissions of the Library folder.
1:
Hi Group,
I'm have a problem when a use
$this-render('list_associate','popup').This popup is a layout created
to show popups in my application but when i click in the link, the
aplication show me the pop up window with default layout.The
application don't show me the layout that i like to see
Not sure what the right answer on your session setup is but I'll tell
you what I have done.
I built an authentication object that holds the user and current
session info as a component.
I add a variable to appmodel to hold a reference to this component in
this case
var $asAuth = false;
Then in
well it is possible to use more then 1 database (you'll see that the
default configuration config/database.php has 2 presets, but you can
enter as many as you want)
but i'm pretty sure that this is not convinced.
most, if not all, websites/applications use 1 database, which holds
many tables ,
i'm tired, typo:
line 4 :but i'm pretty sure that this is not what you want
--~--~-~--~~~---~--~~
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
Cheers Dieter,
I meant to say tables reather than dbs, I've been making that mistake
for two years (foolish I know), I'll have to check that part of the
manual more closely.
One quick question, how do yhou create controllers with no model? Is it
in the manual?
Joel
On Aug 31, 2006, at 9:35 AM, TWIOF wrote:
Cheers Dieter,
I meant to say tables reather than dbs, I've been making that mistake
for two years (foolish I know), I'll have to check that part of the
manual more closely.
One quick question, how do yhou create controllers with no model?
Is
Hi AD7six,
No, I haven't yet tried the db_acl stuff - I was a bit wary of it
because of the lack of multiple groups support, but I guess I'll take a
look and see if it can do what I need :)
Is there a decent, (reasonably) well-explained tutorial or reference
you can point me to?
Thanks!
ahh, the var $uses seems to be what i was after, mixed with models
using multiple dbs and some requestaction stuff too. Nice one
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this
OK it appears to be working now. I had to build a new copy of
httpd.conf from backup to get rid of the bad request errors (Must've
corrupted it somehow). Thanks for all the support.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Plus CakePHP works with PHP4 which doesn't support OO programming. So,
that limitation means that to keep CakePHP working for PHP4 and PHP5
they would need to write a whole PHP engine to handle the differences
at the PHP level and bring the true OO when PHP5 is used instead of 4.
I have found that anything is possible with CakePHP you just have to be
willing to work for it. Yes you can have multiple APP directories all
referencing the same Cake directory. So, each client could have their
own subdirectory and essentially their own installation of your app.
In this way
I have many instances in my application where the output is shown in
tables. What I want to do is allow the user to order the table based
on any of the columns. The first time they click it would sort ASC,
the next time DESC, or have an Up arrow and Down arrow to sort each
way. Now, I could
On OS X, what I found to be the easiest way of getting this working was
via virtual hosting, specificially a virtualhost.sh script. Executable
from the command line on OS X, it lets you put your site directory
wherever you want, point to it as a virtual host, then simply browse to
Hold on there, cowboy. PHP 4 does support object-oriented programming.
On 8/31/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Plus CakePHP works with PHP4 which doesn't support OO programming. So,
that limitation means that to keep CakePHP working for PHP4 and PHP5
they would need to write
I have done something similar using a sortable grid via AJAX calls.
Mine is implemented using the Yahoo! User Interface libraries instead
of the built-in ones. I was having trouble using the
Prototype/Scriptaculous helpers and getting stuff to work properly in
IE. I have plans to do up a
Hi all,
I'm about a week into sing cake and like what I've been able to do so
far.
However, I'm currently a t the early stages of developing a reasonable
sized nightlife listings site. And I'm not sure i can achieve
everything i need with cake.
Basically I'm confused about mixing data from
doublepost
http://groups.google.com/group/cake-php/browse_thread/thread/29fb1a8cf813e1d0/#
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to
Don't get hung up on it being AJAX. It will eventually be AJAX. But I
want it to work straight up without AJAX as well. I want it to
function without being a sortable AJAX grid. I was thinking what if I
used one of the before calls to manipulate the query. Then to also use
a helper for the
Not TRUE object oriented programming. That is the whole revelation of
PHP5 and why most frameworks aren't available to PHP4. Sure it has it
by being VERY careful in what you are doing. But it still is
cumbersome, prone to errors, and slow as compared to PHP5. Which
again, is why most
Hello Group,
I came up with a hopefully useful hack for the findAllThreaded
function.
I have a self-joining table called category with these fields: id,
parent_id, name, description
My users will be able to browse through the different categories, and
will see a tree structure of categories
Okay, you win. But I don't think it really helps Tony fix the problem
that started this thread. It's not a PHP 4 vs. PHP 5 issue, no
matter how many words you devote to telling me that PHP 5 is true
objected-oriented programming. It's a style issue, and if Tony needs
to mix functional
Not sure if this is appropriate to post here, so my apologies if this
is out of place...
Forty Media (http://www.fortymedia.com/) is looking to hire some
CakePHP developers on a contract basis, and eventually full time.
If you're comfortable in your baking skills and are interested in
working
On 8/31/06, James Archer [EMAIL PROTECTED] wrote:
Not sure if this is appropriate to post here, so my apologies if this
is out of place...
This is a good place, but you can be the first poster at :
http://findabaker.42dh.com/
--
Gustavo Carreno
---
If you know Red Hat you know Red Hat,
If
Thanks Toby. Did you do anything else besides running the script?
Because I just tried the script and I get the Cake default page without
any images or CSS when I hit the virtualhost folder with cake installed
in it.
Also this is a script from 2003...maybe something in Tiger is
incompatible?
Don't think it's incompatible - I just ran it ten minutes ago with
10.4.7, no problems. Are you pointing to the webroot folder in your cake
install, or to the cake folder itself? I mucked with things a bit, to
make it match my Linux server, so I did have to edit the paths in the
index.php,
pointing to the folder that holds app, cake etc...
should I point it to the webroot folder instead?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to
a simple piece of php code like this:
echo $html-textarea('Reply/content', array('cols' = 60, 'rows' =
2));
makes the html helper output something like:
textarea name=data[Reply][content] cols=60 rows=2
id=ReplyContent/textarea
and it's not only with textareas, also others (e.g. hidden fields)
If you just want that single field, use the Model::field() function.
$this-StockedItem.id = $stock_item_id;
$stocked_item_price = $this-StockedItem-field('unit_price');
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Hi
I'm currently testing cakePHP to decide if our company should switch
over. I have a quick question which I'm sure is a snap for you gurus to
answer.
I want my homepage to draw a collection of requests from various
database tableseach dataset will populate various elements on the
On Aug 31, 2006, at 7:10 PM, dmancan wrote:
Hi
I'm currently testing cakePHP to decide if our company should switch
over. I have a quick question which I'm sure is a snap for you
gurus to
answer.
I want my homepage to draw a collection of requests from various
database
I knew it was something easysheesh.
Thanks John.
--~--~-~--~~~---~--~~
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,
ignore the:
/* uses no models */
comment.
should change that.
On 01/09/06, Mikee Freedom [EMAIL PROTECTED] wrote:
hey branden,
This might help you.
I'm doing a similar thing with my admin area so I have a simple
admincontroller that grabs info from a few different models and
dosen't
I have a table with a datetime field. The generateDateTime() isn't the
prettiest, but it's prettier than if I built something and will provide
until I set up something more permanent. The problem is, I don't know of
a Cake-ized way of pulling a datetime into a generateDateTime().
ideas?
Hi,
I'm quite new to Cake and I have a question about components/elements
Basically I have a site where there will be a list of categories on
different pages
e.g.
var $name = 'Searches';
var $components = array('ProductSection');
var $uses = 'ProductSection';
You could define the uses array to null. Then, use the requestaction
method to call whatever methods in the needed controllers. I always
use this approach because most of the time I end up AJAXing it and to
update the individual elements I need the methods in the respective
controllers to do so
55 matches
Mail list logo