Re: RC1 Condition Syntax Changes

2008-06-09 Thread Grant Cox
You have to use string based conditions for that - not the array key => value. $where['AND'][] = 'DATE(Table.datefield) <= CURDATE()'; On Jun 10, 3:54 pm, Mr-Yellow <[EMAIL PROTECTED]> wrote: > Still puts quotes around CURDATE. > > $where['AND']['DATE(Table.datefield)'] = '<= -!CURDATE()'; > $w

Re: Shouldn't we use SSL when reading cookies as well as writing them?

2008-06-09 Thread David C. Zentgraf
http://cookies.lcs.mit.edu/sslflag.html > One of the values in a cookie is the SSL? bit. If this bit is set to > true, then the cookie will only be sent back to the server over a > connection which is encrypted with SSL. If it is set to false, the > cookie will be sent whenever the user vis

Re: HABTM viewing all elements of an array

2008-06-09 Thread Simon COURTOIS
Peter54 wrote On 06/10/2008 02:05 AM: > First off I'm not just new to Cake I'm new to programing. I can get my > head around relatively simple stuff and can generalize once I have a > concept but even though I know this is either obvious, or been > answered a thousand times I can't see it anywhere

Re: Blank Login Page

2008-06-09 Thread francky06l
As I understood, you can login and never been redirect (I mean you do not see the page should be redirected to) ? Is it for admin only, or can you see the /clients when not being admin ? If so it can be an admin problem routing. hth On Jun 10, 8:01 am, "Sam Sherlock" <[EMAIL PROTECTED]> wrote: >

Re: Blank Login Page

2008-06-09 Thread Sam Sherlock
try putting some $this->log('custom-login-debug', 'users_controller.php >> login...'); to trace what you've got happening. (not to flog a dead horse but auth is great for simple systems too) 2008/6/10 Arak Tai'Roth <[EMAIL PROTECTED]>: > > I know that auth isn't the same as ACL, but they can b

Re: RC1 Condition Syntax Changes

2008-06-09 Thread Mr-Yellow
Still puts quotes around CURDATE. $where['AND']['DATE(Table.datefield)'] = '<= -!CURDATE()'; $where['AND']['DATE(Table.datefield) <='] = '-!CURDATE()'; $where['AND']['DATE(Table.datefield) <= -!'] = 'CURDATE()'; All result in variations of wrongly interpreted SQL conditions. -Ben On Jun 10,

Re: CMS?

2008-06-09 Thread Sam Sherlock
I have been testing out wildflower it is really nice fully featured; though it is strikingly simular to the 37signals screen shot 2008/6/10 Lance Willett <[EMAIL PROTECTED]>: > > Off-topic, but needed to share this publicly: > > I followed the link above to check out Wildflower. In viewing the >

Re: CMS?

2008-06-09 Thread Lance Willett
Off-topic, but needed to share this publicly: I followed the link above to check out Wildflower. In viewing the screenshots, I was really surprised to see the UI (graphics and layout) look almost identical to the UI built by 37signals with their Backpack product (backpackit.com). It's not cool t

Re: Shouldn't we use SSL when reading cookies as well as writing them?

2008-06-09 Thread aranworld
So, the secure flag gets set in the cookie itself and ensures that the cookie is only ever read over a secure connection? PHP Manual says: When set to TRUE, the cookie will only be set if a secure connection exists. The default is FALSE. On the server-side, it's on the programmer to send this ki

Re: RC1 Condition Syntax Changes

2008-06-09 Thread Dr. Tarique Sani
On Tue, Jun 10, 2008 at 10:51 AM, Mr-Yellow <[EMAIL PROTECTED]> wrote: > > This: > $where['AND']['Table.textfield'] = 'LIKE %word%'; > Has been changed to: > $where['AND']['Table.textfield LIKE'] = '%word%'; > > This: > $where['AND']['DATE(Table.datefield)'] = '<= -!CURDATE()'; > Has been changed

RC1 Condition Syntax Changes

2008-06-09 Thread Mr-Yellow
This: $where['AND']['Table.textfield'] = 'LIKE %word%'; Has been changed to: $where['AND']['Table.textfield LIKE'] = '%word%'; This: $where['AND']['DATE(Table.datefield)'] = '<= -!CURDATE()'; Has been changed to: ?? Anyone worked this one out? Whatever I try it just ends up in quotes. -Ben

Re: Shouldn't we use SSL when reading cookies as well as writing them?

2008-06-09 Thread David C. Zentgraf
Because the browser won't hand the cookie back to Cake over a non-SSL connection anyway if it's been set as secure cookie(?). On 10 Jun 2008, at 13:57, aranworld wrote: > > In the cookie component there is: > > $secure = false > > If set to true, it will only allow you to write a cookie if the

Shouldn't we use SSL when reading cookies as well as writing them?

2008-06-09 Thread aranworld
In the cookie component there is: $secure = false If set to true, it will only allow you to write a cookie if the connect is through an HTTPS connection. But this flag has no impact on reading cookies. The component provides not method for ensuring that a cookie is only read under an SSL conne

Re: Blank Login Page

2008-06-09 Thread Arak Tai'Roth
I know that auth isn't the same as ACL, but they can be used together for some pretty neat stuff in my opinion. I just had looked at auth and thought that because my needs are fairly simple (3 different groups of users, only 2 that need to be accounted for, and 1 will only have one user in it), au

View this page "CakePHP In The Wild"

2008-06-09 Thread [EMAIL PROTECTED]
Added a new site. Click on http://groups.google.com/group/cake-php/web/cakephp-in-the-wild - or copy & paste it into your browser's address bar if that doesn't work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "C

Re: Findall on a belong b belong c.name='fred'

2008-06-09 Thread Dardo Sordi Bogado
Having: A = Product, B = Subcategory, C = Category, then Product belongsTo Subcategory, Subcategory belongsTo Category = A belongsTo B, B belongsTo C Find all Products (A) where Category.name = fred (C) // using containable $conditions = array('Category.name' => 'fred');

How to cache homepage / root ('/') ?

2008-06-09 Thread Action
My root page as defined in routes.php is not caching: Router::connect('/', array('controller' => 'posts', 'action' => 'index')); If I goto /posts/index, it will cache the page, but it will not cache if I just goto '/'. How can I fix this? --~--~-~--~~~---~--~~ Yo

Re: Displaying HABTM data in a view

2008-06-09 Thread Peter54
actually this post was truncated - I posted the passed array in a follow-up post. The issue was that I thought I was using th proper php syntax to print the array variable ($multidimensionalVariableName [ArrayName]['IndexName'] but I get errors - which I assume are because the all the sub-arrays a

Re: Blank Login Page

2008-06-09 Thread Dardo Sordi Bogado
> I wasn't sure if auth would work as easily for what I want later on, > dealing with multiple groups of users. And yes I know about ACL, I > just figured doing it this way now would save me micro management down > the road. Auth != ACL And yes, Auth will handle multiple groups of users just fin

Re: Displaying HABTM data in a view

2008-06-09 Thread b logica
Add this to the top of your view: echo debug($todays_recipe); That will print the array and its key[s] => value[s]. If you're still not sure, post the output from that line. On Mon, Jun 9, 2008 at 7:45 PM, Peter54 <[EMAIL PROTECTED]> wrote: > > First off I'm not just new to Cake I'm new to prog

HABTM viewing all elements of an array

2008-06-09 Thread Peter54
First off I'm not just new to Cake I'm new to programing. I can get my head around relatively simple stuff and can generalize once I have a concept but even though I know this is either obvious, or been answered a thousand times I can't see it anywhere or figure out how it works. I have a two tab

Displaying HABTM data in a view

2008-06-09 Thread Peter54
First off I'm not just new to Cake I'm new to programing. I can get my head around relatively simple stuff and can generalize once I have a concept but even though I know this is either obvious, or been answered a thousand times I can't see how it works. I have a two tables Recipes and Ingredient

Re: Strict or Pretty? We're looking for a few good opinions

2008-06-09 Thread Nate
On Jun 9, 3:41 pm, BrendonKoz <[EMAIL PROTECTED]> wrote: > Therefore, Chris Schifflet, OmniTI, and perhaps Ilia > Alshanetsky would be some contacts that would give some greater > insight in to what may be acceptable losses and/or gains for the > project. Which is convenient, since I work for Omn

Re: blog list

2008-06-09 Thread Dardo Sordi Bogado
http://www.cakephp.org/ <--- click on the "read" link http://groups.google.com/group/cake-php/web/cakephp-official-resources http://groups.google.com/group/cake-php/web/cakephp-unofficial-resources http://groups.google.com/group/cake-php/web/cakephp-in-the-wild#blogs Regards, - Dardo Sordi. On

Re: RC1 SVN Question

2008-06-09 Thread Gwoo
https://svn.cakephp.org/repo/trunk/cake/1.2.x.x is the stable --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this gr

Re: Blank Login Page

2008-06-09 Thread Arak Tai'Roth
I wasn't sure if auth would work as easily for what I want later on, dealing with multiple groups of users. And yes I know about ACL, I just figured doing it this way now would save me micro management down the road. On Jun 9, 2:09 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote: > > $dbuser = $this

Re: Cake 1.2 losing auth/session under load

2008-06-09 Thread Brade
Holy crap, you people possibly saved my life and/or sanity with this. I signed up at nabble just so I could tell you that. I use cake actions to generate images for image galleries, and since those requests are within the completely arbitrary 2-second time frame for session renews, that's what's

blog list

2008-06-09 Thread scs
I been looking all over the cakephp site since it first came up and searched Google for it but I have never found the "office blog list". I'm interested in seeing if there are other blogs (besides the few I found in my daily search for cake information) that I can use to look for the answers to my

RC1 SVN Question

2008-06-09 Thread wilson
Hi everyone, Quick question... Since RC1 is revision 7125. Am I safe to export https://svn.cakephp.org/repo/branches/1.2.x.x As my production code? I did that and it works fine but is revision 7146. If not, how do you check out the RC1 stable? And should that be from trunk or branches? Tha

Re: Trouble with multipple database configs in RC1

2008-06-09 Thread Guillaume
I submitted a ticket. https://trac.cakephp.org/ticket/4873 Sorry for it not being very clear, it was my first one. I try to build a test case but I don't know yet how to use multiple database configs in a test case. Any help would be appreciated (even telling me I'm a complete fool would be) G

Re: Trouble with multipple database configs in RC1

2008-06-09 Thread Bryn
I am seeing the same problem in my Application (not a shell script) I am able to temporarily fix the problem by modifying cake\cake\models \datasources\dbo\dbo_mysql.php function _execute() with the following code (code is commented out below to show what I added): function _execute($sq

Re: Strict or Pretty? We're looking for a few good opinions

2008-06-09 Thread BrendonKoz
Oh, I'd like to add that I have full trust and faith in the developers of the CakePHP project and any decisions made regardless of any possible suggestions offered by others, I simply feel that the general base of readers of this mailing list might not be able to offer a huge insight whereas other

Re: Blank Login Page

2008-06-09 Thread Sam Sherlock
> > $dbuser = $this->User->findByUsername($this->data['User'] > ['username']); > >if (!empty($dbuser) && > ($dbuser['User']['password'] == sha1($this- > >data['User']['password']))) > have you tried using auth? 2008/6/9 Arak Tai'Roth <[EMAIL PROTECTED]>: > > So.

Re: Another "does cake fit my needs" question

2008-06-09 Thread Timothée BRENNER
Yep, I'll do so ! 2008/6/9 b logica <[EMAIL PROTECTED]>: > > Yes, that's true. If properly configured, you should only need to > specify the IP address for the SMTP box. I suggest that you confer > with whomever administers mail for your office. > > On Mon, Jun 9, 2008 at 3:10 AM, Timothée BRENN

Re: Findall on a belong b belong c.name='fred'

2008-06-09 Thread Alex Seim
Have you found a clear answer about this? On 18 Απρ, 04:08, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have 3 models: > A belongs to B > B belongs to C > > I want tofindAllA where C.name='fred'. > > I had assumed that cake would justleft jointhe 3 tables and c.name > would be accessible i

Re: Strict or Pretty? We're looking for a few good opinions

2008-06-09 Thread BrendonKoz
I would vote for contacting some higher level PHP enthusiasts and see if they could offer some insight. I'd imagine that certain areas of strictness can cause slowness, and may be going *way* out of the way for the sake of being strict, whereas other areas may benefit highly to keep things strict

Re: Please include CakeBaker on the blog list

2008-06-09 Thread BrendonKoz
Although I also visit Daniel's blog quite often, I also visit blogs of many of the people that idle and help out in the Cake IRC channel from freenode. People like teknoid have loads of very useful information that is not covered by Daniel, or the other prolific bloggers (such as tips that gwoo o

components and PECL packages

2008-06-09 Thread alainv
Hi all, I am writing a cake component and I need to use the PHP xml-parser and ZipArchive functions. Both are working well on my system outside of the cake component but I cannot figure out how to make them work within the component, probably because of OO issues. Specifically I have trouble setti

Re: How i do date validation?

2008-06-09 Thread Chris Hartjes
On Mon, Jun 9, 2008 at 12:56 PM, GreyWolf <[EMAIL PROTECTED]> wrote: > What's wrong? Thanks. What version of CakePHP are you using? If you're using 1.2, have you looked at this: http://book.cakephp.org/view/125/data-validation -- Chris Hartjes Internet Loudmouth Motto for 2008: "Moving from

How i do date validation?

2008-06-09 Thread GreyWolf
Hi. I tried that way: 'date_create' => array('rule'=>array('date', 'dmy')), 'date_show' => array('date'), And in the view echo $form->input('data_create', array('dateFormat'=>'DMY', 'timeFormat'=>'none')); echo $form->input('dat

Blank Login Page

2008-06-09 Thread Arak Tai'Roth
So. I have coded a login, using admin routing, to a backend administrative portion of my site. However when I actually login, all it shows is a blank page and it doesn't seem to be hitting my admin_index function in my controller. I was just wondering if anyone has any insight to this problem, I h

Re: Another "does cake fit my needs" question

2008-06-09 Thread b logica
Yes, that's true. If properly configured, you should only need to specify the IP address for the SMTP box. I suggest that you confer with whomever administers mail for your office. On Mon, Jun 9, 2008 at 3:10 AM, Timothée BRENNER <[EMAIL PROTECTED]> wrote: > I had never heard about SwiftMailer be

Re: Select or text field depending on another select

2008-06-09 Thread DaveMahon
Be careful with this. While it is programatically possible, it is very poor user interface design and will, in all likelihood, frustrate your users to no end. You might want to seriously reconsider how you implement your interface. dandreta wrote: > Hi, > > I am doing searchs in my cake applicati

Re: Model->find('list') with concatenated display fields is returning an empty array

2008-06-09 Thread RichardAtHome
Excellent, thanks a bundle grigri :-) On Jun 9, 4:11 pm, grigri <[EMAIL PROTECTED]> wrote: > Sorry for the confusion - for 'Model' I meant of course the proper > model name: > > $tmp = $this->ProjectsProject->ProjectRelationshipType->find("all", > array( >   "fields" => array("id", "CONCAT(name,

Re: Model->find('list') with concatenated display fields is returning an empty array

2008-06-09 Thread grigri
Sorry for the confusion - for 'Model' I meant of course the proper model name: $tmp = $this->ProjectsProject->ProjectRelationshipType->find("all", array( "fields" => array("id", "CONCAT(name, '/', antonym) AS name"), "recursive" => -1, "order" => 'name' )); // uncomment the following line

Re: Model->find('list') with concatenated display fields is returning an empty array

2008-06-09 Thread RichardAtHome
Thanks again grigri :-) My Code: $tmp = $this->ProjectsProject->ProjectRelationshipType->find("all", array( "fields" => array("id", "CONCAT(name, '/', antonym) AS name"), "recursive" => -1, "order" => 'name

Re: 404 Error

2008-06-09 Thread DaveMahon
So the web server is looking for /home/async/public_html/SBSCake when the correct path is /home/async/public_html/cake1? Sounds like an apache configuration error to me. Also, make sure that apache has permission to read the directory structure and files. --~--~-~--~~~---

Cakphp 1.1.8 and Transfer-Encoding: chunked (header) experience.

2008-06-09 Thread k10
Hi, I am wondering whether anyone of you had has the chance to get their cake-app working with Transfer-Encoding: chucked as one of the HTTP Response Header. If so could you please share your experience. I just tried setting them in the .htaccess file but I just get a blank page. Maybe I need to

Re: reset Session variables without any visible cause

2008-06-09 Thread Andrew Assarattanakul
I had this same problem when I upgraded from v1.2.0.6311 beta to v1.2.0.7125 RC1. For my session variables I had: Session.save = php Session.cookie = cakephp Session.timeout = 120 Session.checkAgent = true Security.level = high The problem I had was the session would loose the data that was set

Re: Model->find('list') with concatenated display fields is returning an empty array

2008-06-09 Thread grigri
Both methods work fine for me. Post your exact code and I'll see if I can spot any errors. On Jun 9, 3:00 pm, RichardAtHome <[EMAIL PROTECTED]> wrote: > oops, spoke too soon... > > Method 1: Works, but only populates the array with 1 row (the SQL it > produces is correct) > > Method 2: Fails with

Re: Save() triggers Mysql Insert instead of Update ...

2008-06-09 Thread grigri
Don't access the $data property directly; use the set() method: $this->MemberSearchCriteria->set('member_id', $user_id); $this->MemberSearchCriteria->save(...); Or use the $id property: $this->MemberSearchCriteria->id = $user_id; // Doesn't matter what the PK is called, always use `id` here $th

Re: Access to the same record

2008-06-09 Thread Adam Royle
This is not something that is handled automatically (by any web language/framework afaik). It is something you'll need to build into your application depending on your needs. You could easily create a Behavior that could do this checking for you in the model, in a beforeSave callback. You'd still

Re: Model->find('list') with concatenated display fields is returning an empty array

2008-06-09 Thread RichardAtHome
oops, spoke too soon... Method 1: Works, but only populates the array with 1 row (the SQL it produces is correct) Method 2: Fails with the following error: Warning (2): vsprintf() [function.vsprintf]: Too few arguments [CORE \cake\libs\set.php, line 357] On Jun 9, 1:14 pm, RichardAtHome <[EMA

Save() triggers Mysql Insert instead of Update ...

2008-06-09 Thread Raitis L.
Hi, I have a question about save() function. It doesn't trigger Update (instead it does Insert) when I want to update data. When I tried to do the save(), i got a following message: -- Query: INSERT INTO `2p_member_search_criterias` (`gender`,`reason`,`age_from`,`age

Access to the same record

2008-06-09 Thread Marc MENDEZ
Hi, As a new comer to cakePHP, I have a few question with access to database. Is there a simple way, with CakePHP, to handle dual access to a same record ? Example : Two users read the same data (let's say, the same record of a table). The first one edit and save this record ; the second user

Re: Strict or Pretty? We're looking for a few good opinions

2008-06-09 Thread mbavio
Another vote for strict. Cheers, mbavio On Jun 9, 9:18 am, Sliv <[EMAIL PROTECTED]> wrote: > Personally, I think it's best to pick standards up-front to abide by > for anything your code taps into and then commit yourself to > conforming to those documented standards...If you're using PHP, make

Re: ACL schema

2008-06-09 Thread mbavio
Extend the AuthComponent sounds nice, but I think it´s a feature that needs to be added to the core, not just to my app. I´m thinking of opening a new enhancement ticket for next release of the framework. Cheers, mbavio On Jun 9, 4:36 am, XuMiX <[EMAIL PROTECTED]> wrote: > Just extend AuthCompon

Re: Strict or Pretty? We're looking for a few good opinions

2008-06-09 Thread Sliv
Personally, I think it's best to pick standards up-front to abide by for anything your code taps into and then commit yourself to conforming to those documented standards...If you're using PHP, make sure you pass E_STRICT tests and that's where it ends. If you're using html, pick a strict doctype

Re: Model->find('list') with concatenated display fields is returning an empty array

2008-06-09 Thread RichardAtHome
Many thanks grigri :-) I think I'll be opting for method 1 (less code, and I feel the concatenation *should* happen in the database layer) I was using version 2.1 RC1 btw (I can't believe I forgot to include that in my original post >.< ) On Jun 9, 12:40 pm, grigri <[EMAIL PROTECTED]> wrote: >

Re: Model->find('list') with concatenated display fields is returning an empty array

2008-06-09 Thread Smelly_Eddie
iS THIS IN VERSION 1.1 ? Can the concat query be used wirth $this->Model->generateList(); ? On Jun 9, 7:40 am, grigri <[EMAIL PROTECTED]> wrote: > Currently, Model::find('list') only allow for simple fields to be > used. Thw workaround is to use find('all') and Set::combine(). > > Method 1 [perf

Re: how to switch DB config settings?

2008-06-09 Thread Smelly_Eddie
Dardo: Your response prompted me to compile an extensive research team to investigate. After hours of tedious research they have informed that, no, google is not broken. They report in fact that many users just like K3 are finding answers for common problems themselves using the functional 'go

Re: Script protection

2008-06-09 Thread Dr. Tarique Sani
On Mon, Jun 9, 2008 at 4:57 PM, Smelly_Eddie <[EMAIL PROTECTED]> wrote: > > Yeah, I think you should stop coding in CakePHP, pickup ASP. M$ loves > proprietary code, you should be all set. > > Also you should donate money to the group for insulting them so, and > passing of their work as your own.

Re: Help me to merge wamp with cakephp

2008-06-09 Thread stefanski
Make sure, to turn mod_rewrite on and in the /.htaccess and /app/ webroot/.htaccess set: RewriteBase /absolute/wwwpath/to/project/ On Jun 9, 1:21 am, pradeep S <[EMAIL PROTECTED]> wrote: > Hello, > i am brand new to cakephp.. i was working wamp server to > handle my > php projects.. now i

Re: 404 Error

2008-06-09 Thread Smelly_Eddie
thats a hum dinger. have you tried clering out the models in cache, i tend to acces my cake site by hitting the webroot folder itself, not the top(cake). What results does that yield? I hoink any extra info may help the group help you /home/async/public_html/cake1 /home/async/public_html/SBS

Re: Script protection

2008-06-09 Thread Larry E. Masters aka PhpNut
The MIT license allows this to be done, he can encode his code all he wants, the core CakePHP must be distributed under the terms of the MIT license. He can not remove the copyright in the core code, or claim the core code as his own. And the MIT license must be distributed with the core code. htt

Re: Model->find('list') with concatenated display fields is returning an empty array

2008-06-09 Thread grigri
Currently, Model::find('list') only allow for simple fields to be used. Thw workaround is to use find('all') and Set::combine(). Method 1 [perform concat in SQL] : $tmp = $this->Model->find('all', array( 'fields' => array('id', 'CONCAT(name, \'/\', antonym) AS something'), 'recursive' => -1,

Re: From sql query to XML

2008-06-09 Thread Smelly_Eddie
Kurto: This is easy. First create a new layout, named xmlout.thtml(name dont matter) Populate that layout with and then the standard $content_for_layout. Next we open your controller, $this->Render(null,'xmlOut'); this sez, use my new layout! Then you need to make the actual view. Depe

Re: Script protection

2008-06-09 Thread Smelly_Eddie
Let me get this straight... 1 - You want to take the OPEN SOURCE code written by all the dedicated developers and architects from the CakePHP foundation(without paying a dime). 2 - Use that OPEN SOURCE code to build a quick and robust web application. 3 - Declare all contained code (including the

Re: Script protection

2008-06-09 Thread Smelly_Eddie
Let me get this straight... 1 - You want to take the OPEN SOURCE code written by all the dedicated developers and architects from the CakePHP foundation(without paying a dime). 2 - Use that OPEN SOURCE code to build a quick and robust web application. 3 - Declare all contained code (including the

Re: ACL schema

2008-06-09 Thread XuMiX
Just extend AuthComponent On Jun 9, 7:19 am, aranworld <[EMAIL PROTECTED]> wrote: > In the context of the AuthComponent, you cannot use anything but the > alias in the second param.  The logic for this is in the > Auth::action() method. > > -Aran > > On Jun 8, 9:52 am, mbavio <[EMAIL PROTECTED]>

404 Error

2008-06-09 Thread scruffy_mogwai
I have a problem. I am working in a development environement and the path to cake is /home/async/public_html/cake1/. I have done the chmod 777 to app/tmp. But when i go to browse localhost/~async/cake1/ I get the message: "The requested URL /home/async/public_html/SBSCake/app/webroot/ was not fou

Re: Help me with MySQL problem

2008-06-09 Thread k10
try this $this->Link->findAll(array(' id IN (' . implode(',', $topLinks) . ')', 'status' = > UC_STATUS_APPROVED)); -Ketan http://www.propertyjungle.in http://www.innovatechnologies.in On Jun 9, 12:15 pm, Abhimanyu Grover <[EMAIL PROTECTED]> wrote: > Hey, > > This is not Cake specific, but just

Re: Script protection

2008-06-09 Thread Endra Yanuar
agree with Dr. Tarique. 6. Live in the woods!!! On Mon, Jun 9, 2008 at 12:24 PM, Dr. Tarique Sani <[EMAIL PROTECTED]> wrote: > On Mon, Jun 9, 2008 at 10:49 AM, koko <[EMAIL PROTECTED]> wrote: > >> >> No body wanna share his knowledge? >> > > 5. Stop writing PHP code is the best one in m

Model->find('list') with concatenated display fields is returning an empty array

2008-06-09 Thread RichardAtHome
Hi all :-) I'm trying to populate a drop down list using Model->find('list') where the display field is a concatenation of two other fields in the model. I am using the following code: $projectRelationshipTypes = $this->ProjectsProject- >ProjectRelationshipType->find('list', array("fields"=>arr

Re: Update from 1.2 beta to rc leads to huge perfomance drop

2008-06-09 Thread Hermann wacker
Hi @ all thanks for the tips and rants ;) I tried all of the examples that was postet here and results where interesting. But the main thing remains: On Sat, Jun 7, 2008 at 11:36 PM, keymaster <[EMAIL PROTECTED]> wrote: > > Are you claiming 1.2 RC has dropped in performance relative to 1.2 > b

Re: Help me with MySQL problem

2008-06-09 Thread Abhimanyu Grover
Looks like standard SQL thing.. On Jun 9, 2:58 pm, grigri <[EMAIL PROTECTED]> wrote: > This works really well, it's easy to integrate too: > > $this->Model->find('all', array( > 'conditions' => ..., > 'order' => 'FIELD(id, ' . implode(',', $topLinks).')' > )); > > Works like a dream. Is this

Re: Help me with MySQL problem

2008-06-09 Thread Abhimanyu Grover
Awesome!!! Solved the problem in minutes. Thanks buddy.. Here's my new line: $this->set('links', $this->Link->findAll(array('Link.id'=>$topLinks, 'Link.status'=>UC_STATUS_APPROVED),""," FIELD(Link.id,".implode(',', $topLinks).")")); This was something I couldn't find anywhere.Thanks again.. O

Re: Help me with MySQL problem

2008-06-09 Thread grigri
This works really well, it's easy to integrate too: $this->Model->find('all', array( 'conditions' => ..., 'order' => 'FIELD(id, ' . implode(',', $topLinks).')' )); Works like a dream. Is this standard SQL or a MySQL-specific thingy? On Jun 9, 10:46 am, Abhimanyu Grover <[EMAIL PROTECTED]> w

Re: Help me with MySQL problem

2008-06-09 Thread Abhimanyu Grover
Thanks, but it looks like a lot of work going on here, which will kill the code simplicity unfortunately. Let me try Tarique's suggestion, looks good by looking. On Jun 9, 2:31 pm, grigri <[EMAIL PROTECTED]> wrote: > These are just some ideas - not sure which one would be more > efficient: > > $o

Re: Help me with MySQL problem

2008-06-09 Thread grigri
> You have to use ORDER BY FIELD(id, 1, 5, 7, 4, 3) Nice! Didn't know about that. Well, you learn something new every day :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, se

Re: Help me with MySQL problem

2008-06-09 Thread Dr. Tarique Sani
On Mon, Jun 9, 2008 at 12:45 PM, Abhimanyu Grover <[EMAIL PROTECTED]> wrote: > > In first line, I'm trying to get Id's of all top rated links - which > comes from a bit complex algorithm. > In second line, I pass on those ids to findAll() which creates sql > statement like this: > > WHERE `Link`.`

Re: Help me with MySQL problem

2008-06-09 Thread grigri
Erm, sorry - the loop in the second example should be: for($i=count($topLinks)-1; $i>=0; --$i) { $expr[] = $coef . '* (Link.id='.$topLinks[$i].')'; $coef *= 2; } If you have a lot of IDs in the array, it might be worth converting the expression to use Horner's method. On Jun 9, 10:31 am, g

Re: Help me with MySQL problem

2008-06-09 Thread grigri
These are just some ideas - not sure which one would be more efficient: $order = array(); foreach ($topLinks as $linkId) { $order[] = '(Link.id='.$linkId.') DESC'; } ... = $this->Link->find('all', array( 'conditions' => ..., 'order' => $order )); [or] $coef = 1; $expr = array(); for($i=

Re: Strict or Pretty? We're looking for a few good opinions

2008-06-09 Thread dr. Hannibal Lecter
I'm in for the strict. Sooner or later it will come around and bite your behind, so why not prevent it. And, although I can't confirm this, it seems logical that any script is faster when not breaking compliance, and we want Cake to be as fast as possible ;-) Thank you all for working on 1.2 so

Update to RC1 broke Ajax

2008-06-09 Thread Crazy
Hi, A while ago I took on the challenge to get some ajax stuff to work with cake. I was able to get it working the way I wanted, but now, by updating to the latest version it doesn't work anymore. Did something releated to ajax change? The problem I get is that the default layout is rendered, th

Re: Script protection

2008-06-09 Thread Marcin Domanski
If you sell them the code - why can't they change it and reuse it ? Apart from that - thats a great topic on an open-source mailing list :> On Sun, Jun 8, 2008 at 8:02 PM, koko <[EMAIL PROTECTED]> wrote: > > Hey, > > I didn't find a better place to discuss this topic than this group of > bakers

Re: Please include CakeBaker on the blog list

2008-06-09 Thread zonium
Fantastic, a very positive ending! This was what I wished but didn't expect it would happen. Thanks to villas for creating this thread and thanks to the core team for listening. @Daniel : blog more! :) zonium On Jun 8, 2:37 pm, villas <[EMAIL PROTECTED]> wrote: > Thanks Cake Team for reviewing

Re: Build #s for CakePHP Applications

2008-06-09 Thread Larry E. Masters aka PhpNut
Configure::version(); will return the current version # of an official release or trunk version of the code. The branch code, which is where all changes are made, is not updated to return the correct version # until it has been merged to the trunk. -- /** * @author Larry E. Masters * @var string $

Re: UTF8 vs Dreamweaver

2008-06-09 Thread Timothée BRENNER
Okay guys thanks for the feedback ! :) And...make love not EditorFlameWar ! 2008/6/7 Marcin Domanski <[EMAIL PROTECTED]>: > > > Sorry, couldn't resist. EditorFlameWar over? ;o) > It's never over! > Vim FTW! > > > > -- > Marcin Domanski > http://kabturek.info > > > > --~--~-~--~~-

Help me with MySQL problem

2008-06-09 Thread Abhimanyu Grover
Hey, This is not Cake specific, but just posting here as I think this will be useful for others as well. Here's my code: $topLinks = $this->Vote->getTopRated(); $this->set('links', $this->Link->findAll(array('Link.id'=> $topLinks, 'Link.status'=>U

Re: Another "does cake fit my needs" question

2008-06-09 Thread Timothée BRENNER
I had never heard about SwiftMailer before but itlooks nice ! I may be using it for my future application. BTW, it's written here http://www.swiftmailer.org/wikidocs/v3/faq/hugebatches that the best way to send thousands of emails is to use a SMTP server. I have access to one at the office but I wo