Re: Strange query being generated by CakePHP
Alright - I was unable to check this at all last night, so I'll try to answer all the questions in one go here: The $design configuration is: var $design = array( 'persistent' = false, 'driver' = 'adodb', 'connect' = 'mssql', 'host' = 'maggie', 'login' = 'blah', 'password' = 'blah', 'database' = 'design' ); The version of cake is: 1.2.0.6311 beta As to renaming, the model used to be named 'Order', and it had the same problem then. There are no special characters in the fieldnames. Following is a list of the fields in this table: BillOfMaterial BillID numeric NULL BillOfMaterial JobNumber char10 BillOfMaterial Phase char1 BillOfMaterial QuoteNumber char10 BillOfMaterial Divisionchar10 BillOfMaterial Project char70 BillOfMaterial CustID int NULL BillOfMaterial Purchaser char70 BillOfMaterial Attnchar30 BillOfMaterial Fax char14 BillOfMaterial Phone char14 BillOfMaterial Cellchar14 BillOfMaterial CustPO char14 BillOfMaterial IsOrder bit NULL BillOfMaterial IncludeDelivery bit NULL BillOfMaterial IncludeGST bit NULL BillOfMaterial IncludePST bit NULL BillOfMaterial IncludeHST bit NULL BillOfMaterial Deliverydecimal NULL BillOfMaterial GST decimal NULL BillOfMaterial PST decimal NULL BillOfMaterial HST decimal NULL BillOfMaterial AppliedDiscount decimal NULL BillOfMaterial LastModifieddatetimeNULL BillOfMaterial LastModifiedBy char30 BillOfMaterial Notes text2147483647 BillOfMaterial FreightOption char12 BillOfMaterial ShipWithJob char10 BillOfMaterial WantDatedatetimeNULL BillOfMaterial USFunds bit NULL BillOfMaterial Exchangedecimal NULL BillOfMaterial RepFee decimal NULL BillOfMaterial PaymentTermschar50 BillOfMaterial QSRRef char10 BillOfMaterial CreatedOn datetimeNULL BillOfMaterial BookedOndatetimeNULL BillOfMaterial CreatedBy char30 BillOfMaterial BookedBychar30 BillOfMaterial AMIDnumeric NULL BillOfMaterial Sitechar100 BillOfMaterial UoM varchar 2 And as for the controller, how much code from it would you need? Thanks again for all the help so far, Tracy --~--~-~--~~~---~--~~ 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 email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Strange query being generated by CakePHP
I added that little code snippet to the adodb file, and the query is no longer all screwy :) thanks so much for your help. Tracy On May 14, 6:51 pm, egi [EMAIL PROTECTED] wrote: if you're using adodb for database connection, i have filed the error on trachttps://trac.cakephp.org/ticket/4130and the suggested fix. On May 15, 3:21 am, TracyB [EMAIL PROTECTED] wrote: I have a model using a table that's been around forever, so it's not a CakePHP friendly name. My model is set up like so: class Quote extends AppModel { var $name = 'Quote'; var $useTable = 'BillOfMaterial'; var $primaryKey = 'BillID'; var $useDbConfig = 'design'; When I do a $this-Quote-findAll() or $this-paginate('Quote'), this is the query that gets generated: SELECT Quote.BillID AS Quote__BillID AS Quote__BillID AS Quote__BillID AS Quote__BillID AS Quote__BillID AS Quote__BillID AS Quote__BillID, Quote.JobNumber AS Quote__JobNumber AS Quote__JobNumber AS Quote__JobNumber AS Quote__JobNumber AS Quote__JobNumber AS Quote__JobNumber AS Quote__JobNumber, Quote.Phase AS Quote__Phase AS Quote__Phase AS Quote__Phase AS Quote__Phase AS Quote__Phase AS Quote__Phase AS Quote__Phase, Quote.QuoteNumber AS Quote__QuoteNumber AS Quote__QuoteNumber AS Quote__QuoteNumber AS Quote__QuoteNumber AS Quote__QuoteNumber AS Quote__QuoteNumber AS Quote__QuoteNumber, Quote.Division AS Quote__Division AS Quote__Division AS Quote__Division AS Quote__Division AS Quote__Division AS Quote__Division AS Quote__Division, Quote.Project AS Quote__Project AS Quote__Project AS Quote__Project AS Quote__Project AS Quote__Project AS Quote__Project AS Quote__Project, Quote.CustID AS Quote__CustID AS Quote__CustID AS Quote__CustID AS Quote__CustID AS Quote__CustID AS Quote__CustID AS Quote__CustID, Quote.Purchaser AS Quote__Purchaser AS Quote__Purchaser AS Quote__Purchaser AS Quote__Purchaser AS Quote__Purchaser AS Quote__Purchaser AS Quote__Purchaser, Quote.Attn AS Quote__Attn AS Quote__Attn AS Quote__Attn AS Quote__Attn AS Quote__Attn AS Quote__Attn AS Quote__Attn, Quote.Fax AS Quote__Fax AS Quote__Fax AS Quote__Fax AS Quote__Fax AS Quote__Fax AS Quote__Fax AS Quote__Fax, Quote.Phone AS Quote__Phone AS Quote__Phone AS Quote__Phone AS Quote__Phone AS Quote__Phone AS Quote__Phone AS Quote__Phone, Quote.Cell AS Quote__Cell AS Quote__Cell AS Quote__Cell AS Quote__Cell AS Quote__Cell AS Quote__Cell AS Quote__Cell, Quote.CustPO AS Quote__CustPO AS Quote__CustPO AS Quote__CustPO AS Quote__CustPO AS Quote__CustPO AS Quote__CustPO AS Quote__CustPO, Quote.IsOrder AS Quote__IsOrder AS Quote__IsOrder AS Quote__IsOrder AS Quote__IsOrder AS Quote__IsOrder AS Quote__IsOrder AS Quote__IsOrder, Quote.IncludeDelivery AS Quote__IncludeDelivery AS Quote__IncludeDelivery AS Quote__IncludeDelivery AS Quote__IncludeDelivery AS Quote__IncludeDelivery AS Quote__IncludeDelivery AS Quote__IncludeDelivery, Quote.IncludeGST AS Quote__IncludeGST AS Quote__IncludeGST AS Quote__IncludeGST AS Quote__IncludeGST AS Quote__IncludeGST AS Quote__IncludeGST AS Quote__IncludeGST, Quote.IncludePST AS Quote__IncludePST AS Quote__IncludePST AS Quote__IncludePST AS Quote__IncludePST AS Quote__IncludePST AS Quote__IncludePST AS Quote__IncludePST, Quote.IncludeHST AS Quote__IncludeHST AS Quote__IncludeHST AS Quote__IncludeHST AS Quote__IncludeHST AS Quote__IncludeHST AS Quote__IncludeHST AS Quote__IncludeHST, Quote.Delivery AS Quote__Delivery AS Quote__Delivery AS Quote__Delivery AS Quote__Delivery AS Quote__Delivery AS Quote__Delivery AS Quote__Delivery, Quote.GST AS Quote__GST AS Quote__GST AS Quote__GST AS Quote__GST AS Quote__GST AS Quote__GST AS Quote__GST, Quote.PST AS Quote__PST AS Quote__PST AS Quote__PST AS Quote__PST AS Quote__PST AS Quote__PST AS Quote__PST, Quote.HST AS Quote__HST AS Quote__HST AS Quote__HST AS Quote__HST AS Quote__HST AS Quote__HST AS Quote__HST, Quote.AppliedDiscount AS Quote__AppliedDiscount AS Quote__AppliedDiscount AS Quote__AppliedDiscount AS Quote__AppliedDiscount AS Quote__AppliedDiscount AS Quote__AppliedDiscount AS Quote__AppliedDiscount, Quote.LastModified AS Quote__LastModified AS Quote__LastModified AS Quote__LastModified AS Quote__LastModified AS Quote__LastModified AS Quote__LastModified AS Quote__LastModified, Quote.LastModifiedBy AS Quote__LastModifiedBy AS Quote__LastModifiedBy AS Quote__LastModifiedBy AS Quote__LastModifiedBy AS Quote__LastModifiedBy AS Quote__LastModifiedBy AS Quote__LastModifiedBy, Quote.Notes AS Quote__Notes AS Quote__Notes AS Quote__Notes AS Quote__Notes AS Quote__Notes AS Quote__Notes AS Quote__Notes, Quote.FreightOption AS Quote__FreightOption AS Quote__FreightOption AS Quote__FreightOption AS Quote__FreightOption AS Quote__FreightOption AS Quote__FreightOption AS Quote__FreightOption, Quote.ShipWithJob AS Quote__ShipWithJob AS Quote__ShipWithJob AS Quote__ShipWithJob
Strange query being generated by CakePHP
I have a model using a table that's been around forever, so it's not a CakePHP friendly name. My model is set up like so: class Quote extends AppModel { var $name = 'Quote'; var $useTable = 'BillOfMaterial'; var $primaryKey = 'BillID'; var $useDbConfig = 'design'; When I do a $this-Quote-findAll() or $this-paginate('Quote'), this is the query that gets generated: SELECT Quote.BillID AS Quote__BillID AS Quote__BillID AS Quote__BillID AS Quote__BillID AS Quote__BillID AS Quote__BillID AS Quote__BillID, Quote.JobNumber AS Quote__JobNumber AS Quote__JobNumber AS Quote__JobNumber AS Quote__JobNumber AS Quote__JobNumber AS Quote__JobNumber AS Quote__JobNumber, Quote.Phase AS Quote__Phase AS Quote__Phase AS Quote__Phase AS Quote__Phase AS Quote__Phase AS Quote__Phase AS Quote__Phase, Quote.QuoteNumber AS Quote__QuoteNumber AS Quote__QuoteNumber AS Quote__QuoteNumber AS Quote__QuoteNumber AS Quote__QuoteNumber AS Quote__QuoteNumber AS Quote__QuoteNumber, Quote.Division AS Quote__Division AS Quote__Division AS Quote__Division AS Quote__Division AS Quote__Division AS Quote__Division AS Quote__Division, Quote.Project AS Quote__Project AS Quote__Project AS Quote__Project AS Quote__Project AS Quote__Project AS Quote__Project AS Quote__Project, Quote.CustID AS Quote__CustID AS Quote__CustID AS Quote__CustID AS Quote__CustID AS Quote__CustID AS Quote__CustID AS Quote__CustID, Quote.Purchaser AS Quote__Purchaser AS Quote__Purchaser AS Quote__Purchaser AS Quote__Purchaser AS Quote__Purchaser AS Quote__Purchaser AS Quote__Purchaser, Quote.Attn AS Quote__Attn AS Quote__Attn AS Quote__Attn AS Quote__Attn AS Quote__Attn AS Quote__Attn AS Quote__Attn, Quote.Fax AS Quote__Fax AS Quote__Fax AS Quote__Fax AS Quote__Fax AS Quote__Fax AS Quote__Fax AS Quote__Fax, Quote.Phone AS Quote__Phone AS Quote__Phone AS Quote__Phone AS Quote__Phone AS Quote__Phone AS Quote__Phone AS Quote__Phone, Quote.Cell AS Quote__Cell AS Quote__Cell AS Quote__Cell AS Quote__Cell AS Quote__Cell AS Quote__Cell AS Quote__Cell, Quote.CustPO AS Quote__CustPO AS Quote__CustPO AS Quote__CustPO AS Quote__CustPO AS Quote__CustPO AS Quote__CustPO AS Quote__CustPO, Quote.IsOrder AS Quote__IsOrder AS Quote__IsOrder AS Quote__IsOrder AS Quote__IsOrder AS Quote__IsOrder AS Quote__IsOrder AS Quote__IsOrder, Quote.IncludeDelivery AS Quote__IncludeDelivery AS Quote__IncludeDelivery AS Quote__IncludeDelivery AS Quote__IncludeDelivery AS Quote__IncludeDelivery AS Quote__IncludeDelivery AS Quote__IncludeDelivery, Quote.IncludeGST AS Quote__IncludeGST AS Quote__IncludeGST AS Quote__IncludeGST AS Quote__IncludeGST AS Quote__IncludeGST AS Quote__IncludeGST AS Quote__IncludeGST, Quote.IncludePST AS Quote__IncludePST AS Quote__IncludePST AS Quote__IncludePST AS Quote__IncludePST AS Quote__IncludePST AS Quote__IncludePST AS Quote__IncludePST, Quote.IncludeHST AS Quote__IncludeHST AS Quote__IncludeHST AS Quote__IncludeHST AS Quote__IncludeHST AS Quote__IncludeHST AS Quote__IncludeHST AS Quote__IncludeHST, Quote.Delivery AS Quote__Delivery AS Quote__Delivery AS Quote__Delivery AS Quote__Delivery AS Quote__Delivery AS Quote__Delivery AS Quote__Delivery, Quote.GST AS Quote__GST AS Quote__GST AS Quote__GST AS Quote__GST AS Quote__GST AS Quote__GST AS Quote__GST, Quote.PST AS Quote__PST AS Quote__PST AS Quote__PST AS Quote__PST AS Quote__PST AS Quote__PST AS Quote__PST, Quote.HST AS Quote__HST AS Quote__HST AS Quote__HST AS Quote__HST AS Quote__HST AS Quote__HST AS Quote__HST, Quote.AppliedDiscount AS Quote__AppliedDiscount AS Quote__AppliedDiscount AS Quote__AppliedDiscount AS Quote__AppliedDiscount AS Quote__AppliedDiscount AS Quote__AppliedDiscount AS Quote__AppliedDiscount, Quote.LastModified AS Quote__LastModified AS Quote__LastModified AS Quote__LastModified AS Quote__LastModified AS Quote__LastModified AS Quote__LastModified AS Quote__LastModified, Quote.LastModifiedBy AS Quote__LastModifiedBy AS Quote__LastModifiedBy AS Quote__LastModifiedBy AS Quote__LastModifiedBy AS Quote__LastModifiedBy AS Quote__LastModifiedBy AS Quote__LastModifiedBy, Quote.Notes AS Quote__Notes AS Quote__Notes AS Quote__Notes AS Quote__Notes AS Quote__Notes AS Quote__Notes AS Quote__Notes, Quote.FreightOption AS Quote__FreightOption AS Quote__FreightOption AS Quote__FreightOption AS Quote__FreightOption AS Quote__FreightOption AS Quote__FreightOption AS Quote__FreightOption, Quote.ShipWithJob AS Quote__ShipWithJob AS Quote__ShipWithJob AS Quote__ShipWithJob AS Quote__ShipWithJob AS Quote__ShipWithJob AS Quote__ShipWithJob AS Quote__ShipWithJob, Quote.WantDate AS Quote__WantDate AS Quote__WantDate AS Quote__WantDate AS Quote__WantDate AS Quote__WantDate AS Quote__WantDate AS Quote__WantDate, Quote.USFunds AS Quote__USFunds AS Quote__USFunds AS Quote__USFunds AS Quote__USFunds AS Quote__USFunds AS Quote__USFunds AS Quote__USFunds, Quote.Exchange AS Quote__Exchange AS Quote__Exchange AS Quote__Exchange AS Quote__Exchange AS Quote__Exchange AS Quote__Exchange AS Quote__Exchange, Quote.RepFee AS
CakePHP creating strange SQL query
I'm trying to go through the Example: Simple User Authentication in the CakePHP manual, to learn how to set up my own authentication for a website. The database that I have to use for authentication is a legacy Access database, and I have connected to it successfully with Cake already. For some reason, when I try to login, the query that gets generated is a little screwy. It generates: SELECT User.AccName AS User__AccName AS User__AccName AS User__AccName, User.AccPass AS User__AccPass AS User__AccPass AS User__AccPass, User.FirstName AS User__FirstName AS User__FirstName AS User__FirstName, User.Surname AS User__Surname AS User__Surname AS User__Surname, User.ContactID AS User__ContactID FROM registrar AS User WHERE User.acc_name = 'dev' LIMIT 1 I don't understand why it's repeating the AS so many times, I haven't seen that before in any of the generated queries. My model is fairly simple: class User extends AppModel { var $name = 'User'; var $useTable = 'registrar'; var $primaryKey = 'ContactID'; var $useDbConfig = 'orderflow'; var $hasMany = 'Order'; } Is there something remarkably stupid that I'm doing that I'm just not aware of? Thanks, Tracy --~--~-~--~~~---~--~~ 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 more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP creating strange SQL query
this is under the adodb driver for access. I have another model using an access database, and that one doesn't seem to be doing this. did you find a fix, or did you just switch to a different database? On Feb 6, 10:14 am, hellfish [EMAIL PROTECTED] wrote: I had a similar problem while using adodb driver and odbc_mssql. While using mysql worked ok. What driver are you using? On Feb 6, 1:48 pm, TracyB [EMAIL PROTECTED] wrote: I'm trying to go through the Example: Simple User Authentication in the CakePHP manual, to learn how to set up my own authentication for a website. The database that I have to use for authentication is a legacy Access database, and I have connected to it successfully with Cake already. For some reason, when I try to login, the query that gets generated is a little screwy. It generates: SELECT User.AccName AS User__AccName AS User__AccName AS User__AccName, User.AccPass AS User__AccPass AS User__AccPass AS User__AccPass, User.FirstName AS User__FirstName AS User__FirstName AS User__FirstName, User.Surname AS User__Surname AS User__Surname AS User__Surname, User.ContactID AS User__ContactID FROM registrar AS User WHERE User.acc_name = 'dev' LIMIT 1 I don't understand why it's repeating the AS so many times, I haven't seen that before in any of the generated queries. My model is fairly simple: class User extends AppModel { var $name = 'User'; var $useTable = 'registrar'; var $primaryKey = 'ContactID'; var $useDbConfig = 'orderflow'; var $hasMany = 'Order'; } Is there something remarkably stupid that I'm doing that I'm just not aware of? Thanks, Tracy --~--~-~--~~~---~--~~ 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 more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP creating strange SQL query
Well, i really don't think it needs to have the same field aliased 3 times to the same name. That is what is causing access to choke. I'm fairly sure it would be better for 'SELECT User.AccName AS User__AccName AS User__AccName AS User__AccName,' to just use the AS once, rather than 3 times. Again, the repeated AS is causing the choke, I'm just trying to find out where that repetition is coming from. Tracy On Feb 6, 11:20 am, grigri [EMAIL PROTECTED] wrote: This isn't a bug, or even a problem. Cake unifies all database systems with a consistent API. When returning result sets, certain database systems (like mysql) identify the originating table for each field, whereas others don't. CakePHP needs that information to decide which array to place the result field in, for queries using joins. If the database does not support retrieving the table information, cake fakes it by imposing a certain format on the field aliases (Table__field) and extracts them later. You never see the aliases except in the SQL log. Bottom line: leave it be, it's supposed to be like this. On Feb 6, 4:06 pm, hellfish [EMAIL PROTECTED] wrote: Right now I'm going forward using mysql, but my company only provides sql server so it's going to be interesting in a few days. I wasn't able to find any fixes to that problem. On Feb 6, 3:15 pm, TracyB [EMAIL PROTECTED] wrote: this is under the adodb driver for access. I have another model using an access database, and that one doesn't seem to be doing this. did you find a fix, or did you just switch to a different database? On Feb 6, 10:14 am, hellfish [EMAIL PROTECTED] wrote: I had a similar problem while using adodb driver and odbc_mssql. While using mysql worked ok. What driver are you using? On Feb 6, 1:48 pm, TracyB [EMAIL PROTECTED] wrote: I'm trying to go through the Example: Simple User Authentication in the CakePHP manual, to learn how to set up my own authentication for a website. The database that I have to use for authentication is a legacy Access database, and I have connected to it successfully with Cake already. For some reason, when I try to login, the query that gets generated is a little screwy. It generates: SELECT User.AccName AS User__AccName AS User__AccName AS User__AccName, User.AccPass AS User__AccPass AS User__AccPass AS User__AccPass, User.FirstName AS User__FirstName AS User__FirstName AS User__FirstName, User.Surname AS User__Surname AS User__Surname AS User__Surname, User.ContactID AS User__ContactID FROM registrar AS User WHERE User.acc_name = 'dev' LIMIT 1 I don't understand why it's repeating the AS so many times, I haven't seen that before in any of the generated queries. My model is fairly simple: class User extends AppModel { var $name = 'User'; var $useTable = 'registrar'; var $primaryKey = 'ContactID'; var $useDbConfig = 'orderflow'; var $hasMany = 'Order'; } Is there something remarkably stupid that I'm doing that I'm just not aware of? Thanks, Tracy --~--~-~--~~~---~--~~ 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 more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP creating strange SQL query
It just happens on this one, and I'm wondering if it has to do with the fact that i'm using a legacy database, so my User model is actually using the table Registrar. I was just wondering if maybe it's caused somehow by it being an access database and having the $useTable set. Perhaps a bug in the adodb driver in that particular situation or something. I don't actually have any other models on the exact same database, though i have another model running off a different access database table, and that one doesn't cause any problems. On Feb 6, 11:36 am, grigri [EMAIL PROTECTED] wrote: Oops, yes, you're right. I was seeing commas where there weren't any. Reading too fast, I suppose. Sorry. The aliasing is normally handled in the specific datasource class [for the database type] Does this happen for any other models/tables on the same database, or just this one? On Feb 6, 4:24 pm, TracyB [EMAIL PROTECTED] wrote: Well, i really don't think it needs to have the same field aliased 3 times to the same name. That is what is causing access to choke. I'm fairly sure it would be better for 'SELECT User.AccName AS User__AccName AS User__AccName AS User__AccName,' to just use the AS once, rather than 3 times. Again, the repeated AS is causing the choke, I'm just trying to find out where that repetition is coming from. Tracy On Feb 6, 11:20 am, grigri [EMAIL PROTECTED] wrote: This isn't a bug, or even a problem. Cake unifies all database systems with a consistent API. When returning result sets, certain database systems (like mysql) identify the originating table for each field, whereas others don't. CakePHP needs that information to decide which array to place the result field in, for queries using joins. If the database does not support retrieving the table information, cake fakes it by imposing a certain format on the field aliases (Table__field) and extracts them later. You never see the aliases except in the SQL log. Bottom line: leave it be, it's supposed to be like this. On Feb 6, 4:06 pm, hellfish [EMAIL PROTECTED] wrote: Right now I'm going forward using mysql, but my company only provides sql server so it's going to be interesting in a few days. I wasn't able to find any fixes to that problem. On Feb 6, 3:15 pm, TracyB [EMAIL PROTECTED] wrote: this is under the adodb driver for access. I have another model using an access database, and that one doesn't seem to be doing this. did you find a fix, or did you just switch to a different database? On Feb 6, 10:14 am, hellfish [EMAIL PROTECTED] wrote: I had a similar problem while using adodb driver and odbc_mssql. While using mysql worked ok. What driver are you using? On Feb 6, 1:48 pm, TracyB [EMAIL PROTECTED] wrote: I'm trying to go through the Example: Simple User Authentication in the CakePHP manual, to learn how to set up my own authentication for a website. The database that I have to use for authentication is a legacy Access database, and I have connected to it successfully with Cake already. For some reason, when I try to login, the query that gets generated is a little screwy. It generates: SELECT User.AccName AS User__AccName AS User__AccName AS User__AccName, User.AccPass AS User__AccPass AS User__AccPass AS User__AccPass, User.FirstName AS User__FirstName AS User__FirstName AS User__FirstName, User.Surname AS User__Surname AS User__Surname AS User__Surname, User.ContactID AS User__ContactID FROM registrar AS User WHERE User.acc_name = 'dev' LIMIT 1 I don't understand why it's repeating the AS so many times, I haven't seen that before in any of the generated queries. My model is fairly simple: class User extends AppModel { var $name = 'User'; var $useTable = 'registrar'; var $primaryKey = 'ContactID'; var $useDbConfig = 'orderflow'; var $hasMany = 'Order'; } Is there something remarkably stupid that I'm doing that I'm just not aware of? Thanks, Tracy --~--~-~--~~~---~--~~ 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 more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Access Control Manager (ACM) Plugin Now Available!
Hi there: I've downloaded the ACM plugin and can see it by going to http://mysite/acm - however, I'm getting some errors even though I'm pretty sure I have my database set up right. For instance, I get: SQL Error in model Aro: 1054: Unknown column ' lft' in 'order clause' Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\cake\app\plugins\acm\controllers\acm_controller.php on line 63 SQL Error in model Aco: 1054: Unknown column ' lft' in 'order clause' Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\cake\app\plugins\acm\controllers\acm_controller.php on line 80 when I go to the Permissions page. When I go to Managed Controllers I get: Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\cake\app\plugins\acm\views\acm\privileges.thtml on line 4 And when I go to Users Groups I get: SQL Error in model Aro: 1054: Unknown column ' lft' in 'order clause' Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\cake\app\plugins\acm\views\acm\privileges.thtml on line 4 I created my database tables by looking at the fields listed in the cake\scripts\acl.php file and the column 'lft' does exist in both the aros and acos tables, so I'm not sure what the issue is. I'm able to AutoLoad users with no problems. Anyhow, if this is something I screwed up, sorry to bother you :) Tracy rpeterson wrote: Hey Everyone! ACM Plugin is now ready to rock! We currently released version 0.10.0.4 pending bug fixes to version 1.0. The project can be found at: http://cakeforge.org/projects/acm/ . What is ACM? ACM is a simple web-interface will plug into your exisitng CakePHP application by simply droping it into the plugin directory. Alowing you to easily manage your ACL Permissions. Note: Thie project was origonal called ACL Admin, since then we have decided to rename it and open it as a whole new project. I am usualy on irc if you have any questions. ~rpeterson **Many thanks to gwoo for all his help on geting this project available** --~--~-~--~~~---~--~~ 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 more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Access Control Manager (ACM) Plugin Now Available!
I would jump on IRC if I weren't at work :) Ports blocked and all that. I just downloaded cake from the cakephp.org website today, so I'm guessing I'm running the most recent - 1.0.1.2708. I created an empty user and permission model because the first errors were looking for models for those 2 tables (i have a permissions table rather than a roles table). Those are the only files I have in addition to the ACM folder in plugins. Now, I'm not sure if this would affect anything, but I'm running cake from a subdirectory rather than the documentroot. I can change this to test if you like. Thanks, Tracy --~--~-~--~~~---~--~~ 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 more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Access Control Manager (ACM) Plugin Now Available!
Thanks for the swift fix :) I'm getting another issue now though - I deleted the old installation and have no files except the new ACM in plugins, and user.php and permission.php (empty models) in the models directory. When I try to go to http://mysite/acm, I get: Fatal error: Call to a member function write() on a non-object in C:\xampp\htdocs\cake\app\plugins\acm\config.php on line 23 It seems to have a problem with: $this-Session-write('ACM.AutoLoad',false); If I knew more PHP I'd just try to fix it myself, but I come from an ASP(ick) background. Tracy --~--~-~--~~~---~--~~ 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 more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---