Querying across multiple tables in CakePHP 3.x ORM

2014-12-09 Thread george dan gil Duran
I have three tables *Countries, Cities* and *Addresses*. Their relationship is Countries hasMany Cities, Cities hasMany Addresses. So Its something like this Countries-Cities-Addresses. If I want to get all addresses in a certain city I can do it like this $this-paginate = [

CakePhp doesn't read the script

2013-09-17 Thread George Manvelishvili
I updated my apache and php on local server and my project on cake stoped working. Now it looks like on the picture https://lh5.googleusercontent.com/-lMpm_kBoAAw/UjdnyAgRjgI/FUE/f2I4QgTZ_1A/s1600/%D0%BA%D0%B5%D0%B9%D0%BA.png Please HELP is extremely needed! -- Like Us on FaceBook

cakePHP File Download was not found or not readable

2013-08-14 Thread george dan gil Duran
I've been struggling now for an hour trying to fix this. I used this to download file from app/uploads/directory. It says the directory not found or not readable. Yet i checked it and it was there also the file using $file['File']['filename']. I want to know what I am missing here.? $file =

Re: $this-redirect not working

2012-03-10 Thread George M. Behr
Without the redirect Cake should take you back to the 'instructions' view. Have you tried removing the redirect line to see what happens (assuming the instructions action you have here is in the instructions controller)? George On Sat, Mar 10, 2012 at 8:54 PM, Brian Bowler bbowle...@gmail.com

Re: Hot out of the oven CakePHP 1.3 alpha

2009-11-03 Thread George H
Great work guys! On Nov 4, 4:28 pm, mark_story mark.st...@gmail.com wrote: The CakePHP development team is happy to release the alpha build of CakePHP 1.3.  We've been hard at work improving upon the already great 1.2 and implementing new features to ease development and increase the

Re: Odd code in sanitize core lib?

2009-10-29 Thread George H
...@gmail.com wrote: I thought you were lying so I checked, and haha it is there. Im curious on this as well. On Oct 28, 8:51 pm, George H acher...@gmail.com wrote: Hi guys, I've been debugging my controller that is using Sanitize and I had a peek inside the CakePHP Sanitize core

Odd code in sanitize core lib?

2009-10-28 Thread George H
curious if I am lost my marbles or not and maybe I'm seeing things), so any core devs out there please do not see this as a personal attack on you, or your intelligence, or ability to cut good code, etc etc. Cheers, -- George --~--~-~--~~~---~--~~ You received this message

Re: Release: CakePHP 1.2.5

2009-10-06 Thread George H
up the good work Mark et al. -- George On Oct 2, 12:55 pm, mark_story mark.st...@gmail.com wrote: George, Sorry to hear you're miffed, but I made a mistake in packaging 1.2.5 so the version number printed when running shells reads 1.2.4.8284. While the VERSION.txt reads 1.2.5.  So if you

Re: Release: CakePHP 1.2.5

2009-10-01 Thread George H
* @version $Revision$ * @modifiedby$LastChangedBy$ * @lastmodified $Date$ and return $config['Cake.version'] = '1.2.4.8284'; for cake 1.2.5 Any comments from developers? On Sep 10, 5:53 am, George H acher...@gmail.com wrote: Good going with the release of 1.2.5! I've already

Re: find conditions comparing two fields

2009-09-16 Thread George
Nice, that worked. Thanks! On Sep 15, 5:56 pm, brian bally.z...@gmail.com wrote: Try: $conditions = array('User.id = User.parent_id'); On Tue, Sep 15, 2009 at 5:51 PM, George geo...@hakumei.net wrote: This seems like a simple thing to do, but I haven't been able to figure out how

find conditions comparing two fields

2009-09-15 Thread George
This seems like a simple thing to do, but I haven't been able to figure out how to write the find conditions array to do it. Basically, I want to run a query where I check whether one field in the record equals another field in the same record. A simple illustration in SQL: SELECT * FROM users

Re: Release: CakePHP 1.2.5

2009-09-09 Thread George H
Good going with the release of 1.2.5! I've already downloaded and installed it. However, I noticed that the version reported is still 1.2.4.8284. Are you sure this is a clean commit to the code base? Commit [e693e881e05dba168f49d14ab657dbff2b2f9c88] in the changelog says that the version number

IE7 form submission with array fields

2009-07-21 Thread George
I'm not sure this is specific to cakePHP, but has anyone encountered an issue with IE7 where it truncates an array-like form field? Basically, I have a dynamic form using javascript that allows an arbitrary number of fields, all named the same (prices.0.price, prices. 1.price, etc). Whenever I

Re: Database / Relationship question (habtm)

2009-07-21 Thread George
You really need to think of the three entities separately first, and decide how they should be related before you go on and start coding. Making an ER diagram is usually very helpful. (look it up if you don't know what an ER diagram is...you'll find a ton of info). It sounds like your app is

Re: Paginator sort() links not switching between asc and desc?

2009-04-19 Thread George H
Great, this worked! Thanks! On Apr 17, 5:54 pm, dr. Hannibal Lecter lecter...@gmail.com wrote: Yup... https://trac.cakephp.org/ticket/6218 On Apr 17, 8:38 am, George H acher...@gmail.com wrote: Hi guys, I have a list of users displayed in my view in a table, and the resultset

Re: Paginator sort() links not switching between asc and desc?

2009-04-19 Thread George H
Great, this worked! Thanks! On Apr 17, 5:54 pm, dr. Hannibal Lecter lecter...@gmail.com wrote: Yup... https://trac.cakephp.org/ticket/6218 On Apr 17, 8:38 am, George H acher...@gmail.com wrote: Hi guys, I have a list of users displayed in my view in a table, and the resultset

Paginator sort() links not switching between asc and desc?

2009-04-17 Thread George H
code here: http://pastebin.com/f64b7e200 TIA. -- George --~--~-~--~~~---~--~~ 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 group, send

Re: Offline version of the CakePHP manual.

2009-04-06 Thread George Hickman
Dardo, I'd be interested in that script too, if you could send me a copy that would be a great help Cheers George On Apr 5, 9:24 pm, Dardo Sordi Bogado dardoso...@gmail.com wrote: Dardo, if I could ask you to either send me the source or publish it, as it looks like a nice script to have

Re: Defining Custom Association Queries - merging results fails

2009-03-26 Thread George
] IN ({$__cakeID__$})')); Shouldn't the fact that I have className set, put a key in that merge array? Or am I missing something? On Mar 24, 1:29 pm, George geo...@hakumei.net wrote: I have two tables I want to link together, but the association is a bit more complicated than it normally would

Defining Custom Association Queries

2009-03-24 Thread George
I have two tables I want to link together, but the association is a bit more complicated than it normally would be. One of the tables (users) is built specifically for cake, another is a table from a read- only database (salespeople). User.username = Salespeople.email (or xxx in x...@site.com).

Help on somewhat complicated model relationships

2009-03-12 Thread George
I have an application that is using three user models, from three datasources. One is specifically built for the application (User), one is LDAP-based (NetworkAccount), and the third is a static database (Salesperson), in that I can only read from it. I'm also using the ACL component, which

String 'NULL' inserted instead of value NULL with ACL, MSSQL. Help?

2009-03-11 Thread George
I've been grinding away with ACL on a project, and I'm running into what appears to be a bug with the ACL code and dbo_mssql.php. Basically inserting new aco records fail due to cake generating incorrect SQL code (it puts single quotes around a NULL, thus inserting the string NULL, not NULL

Re: String 'NULL' inserted instead of value NULL with ACL, MSSQL. Help?

2009-03-11 Thread George
change the last part to strtolower($data) == 'null' to catch any form of NULL instead. On Mar 11, 9:04 am, George geo...@hakumei.net wrote: I've been grinding away with ACL on a project, and I'm running into what appears to be a bug with the ACL code and dbo_mssql.php. Basically inserting new aco

Re: Using a model without a table

2008-12-29 Thread George
stumbles upon this thread. On Dec 25, 10:14 pm, Dr. Loboto drlob...@gmail.com wrote: George, what Cake version do you use? I tried your posts test with table replacing (to users one in my case) and it was fine. Debug outputed Post::$useTable = users etc. Test with $useTable = false also

Re: Using a model without a table

2008-12-29 Thread George
my way around the file structure pretty good now. On Dec 29, 8:58 am, George geo...@hakumei.net wrote: I've been using the release candidates, and just upgraded to stable 1.2, hoping that would fix the issue but it hasn't. I've tried using MySQL now instead of MS SQL Server just to see

Re: Using a model without a table

2008-12-23 Thread George
for this. There's a method you have to implement (sorry I didn't write it down). On Dec 22, 11:26 am, George geo...@hakumei.net wrote: Thanks for the suggestion, but unfortunately it didn't seem to do anything, and I still am getting a complaint that the reports table for the Report model

Re: Using a model without a table

2008-12-23 Thread George
cache too) On Dec 23, 1:26 am, George geo...@hakumei.net wrote: Thanks for the suggestion, but unfortunately it didn't seem to do anything, and I still am getting a complaint that the reports table for the Report model was not found. Here is the exact code in the model: ?php class

Re: Using a model without a table

2008-12-22 Thread George
Thanks for the suggestion, but unfortunately it didn't seem to do anything, and I still am getting a complaint that the reports table for the Report model was not found. Here is the exact code in the model: ?php class Report extends AppModel { var $useTable = false; public

Using a model without a table

2008-12-18 Thread George
Hello. I'm pretty new to cake and am working on creating a reporting intranet application. Basically I aggregate a bunch of data through views and stored procedures on the database, and would like to build a Report model that will just have a bunch of custom functions to run the various stored

setFlash extended parameters

2008-07-03 Thread Marc George
Hi I'm a new Cake user, cutting my teeth on 1.2. Forgive me if I'm being stupid here but I'm finding the documentation a little unclear on the use of SessionComponent::setFlash() in its extended form. i.e: SessionComponent::setFlash ($message, $layout = 'default', $params = array(),$key =

Re: Moving data from a controller to a view after doing some queries

2008-03-25 Thread George C
snip Thank you sir, you are a saint! --~--~-~--~~~---~--~~ 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

Moving data from a controller to a view after doing some queries

2008-03-24 Thread George C
Hello! It seems like my lack of knowledge of MVC is once again holding me back. I'm attempting to develop some code that searches for users in the database and shows ones who's first or last names match. So, I have a function in my controller: function findsomeone() {

Re: enum

2008-03-04 Thread George C
On Jan 25, 8:32 am, MonkeyGirl [EMAIL PROTECTED] wrote: How would you get the enum values from the model or controller? By far the easiest way is to go tohttp://cakeforge.org/snippet/detail.php?type=snippetid=112 and copy and paste the code that's there into app_model.php, then you can

Help configuring CakePHP 1.1 or 1.2 for a total CakePHP newbie

2008-02-24 Thread George C
Hello! I'd like to get started using Cake, but so far I haven't had a lot of luck. I've been attempting to follow the excellent Cook up Web sites fast with CakePHP, Part 1 hosted at: http://www-128.ibm.com/developerworks/edu/os-dw-os-php-cake1.html My first attempt involved using CakePHP 1.2,

Help configuring CakePHP 1.1 or 1.2 for a total CakePHP newbie

2008-02-24 Thread George C
Hello! I'd like to get started using Cake, but so far I haven't had a lot of luck. I've been attempting to follow the excellent Cook up Web sites fast with CakePHP, Part 1 hosted at: http://www-128.ibm.com/developerworks/edu/os-dw-os-php-cake1.html My first attempt involved using CakePHP 1.2,

Inflections not being applied?

2008-02-13 Thread George H
Hey everyone, I have set up CakePHP 1.2 beta on my host and am writing a CMS. I have set up two models, one called Menus and the other called Contents. Menus - hasMany - Contents, while Contents - belongsTo - Menus. In my controller code, I am at the stage of validating my data against the

Inflections not being applied?

2008-02-13 Thread George H
Hey everyone, I have set up CakePHP 1.2 beta on my host and am writing a CMS. I have set up two models, one called Menus and the other called Contents. Menus - hasMany - Contents, while Contents - belongsTo - Menus. In my controller code, I am at the stage of validating my data against the

Missing Action / Controller / View doesn't see JavascriptHelper?

2007-10-15 Thread George @ Dogma
Hey everyone, I think I have broken my CakePHP application that I am making... As you all very well know, CakePHP throws error messages when it comes across a missing action, controller, view, etc. However, I have done something to my default.thtml file and now this does not function. If I was

Re: Missing Action / Controller / View doesn't see JavascriptHelper?

2007-10-15 Thread George @ Dogma
Actually, sorry I had found out how to do it! I just added the line: var $helpers = array(Html, Form, Javascript, Ajax); to my app_controller.php file and it's working fine. Sorry for wasting resources! On Oct 16, 2:25 pm, George @ Dogma [EMAIL PROTECTED] wrote: Hey everyone, I think I