Re: [professionel] Re: Cake is breaking database views. This looks like a bug.

2007-01-29 Thread Bernard Grosperrin
Chris You're probably right that 9+ years of exposure to MySQL, Postgres and some Oracle mixed in there as well gives me no real sql/database background. Exposure? Sorry, what do that mean? I have been exposed to the sun, quite a bit, that did not give me any specific insider

Re: [professionel] Re: Cake is breaking database views. This looks like a bug.

2007-01-29 Thread Bernard Grosperrin
AD7six wrote: How about just using the method rawQuery (or whichever is the lowest common-denominator model query method)? Don't know, I am not a specialist in Cake, but so far I have been unable to create a controller on a view (backend view, I mean). And I have not tried either to have

Re: [professionel] Re: Cake is breaking database views. This looks like a bug.

2007-01-29 Thread Bernard Grosperrin
Larry E. Masters aka PhpNut wrote: No one will be banned from the list unless I do it, and that happens only when I feel someone has pushed me to do it. Thanks you. Bernard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: [professionel] Re: Cake is breaking database views. This looks like a bug.

2007-01-29 Thread Bernard Grosperrin
Larry E. Masters aka PhpNut wrote Get this thread back on topic or I will close it OK, sorry. Bernard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: [professionel] Re: Cake is breaking database views. This looks like a bug.

2007-01-29 Thread Bernard Grosperrin
Chris Um, I never said I was a DBA or looking to work as a DBA. I've never been discounted from a position as a developer because I didn't know what a view was or how to use it. And on top of it, you continue to be incredibly rude towards me. Your little joke about exposure to the sun is a

Re: [professionel] Re: Cake is breaking database views. This looks like a bug.

2007-01-29 Thread Bernard Grosperrin
Jeff Be warned that you have to be explicitly clear in aliasing your complex queries, or Cake will not know what to do. SELECT User.first_name, User.last_name FROM users User If you're using SQL functions, don't forget to alias those as well... The aliases are the foundation to RDBMS -

Re: [professionel] Re: Cake is breaking database views. This looks like a bug.

2007-01-29 Thread Bernard Grosperrin
ralph And Bernard, I actually enjoy admitting that I don't understand everything. That gives me a chance to learn something new. Learning is one of the greatest pleasures in my life, and I would feel deprived without it. As a result, I have a powerful and continuing need for significant

Re: [professionel] Re: Cake is breaking database views. This looks like a bug.

2007-01-29 Thread Bernard Grosperrin
Samuel DeVore wrote: I wonder if some kind of model extension could be proposed by people who are deeply involved in the use of views in their database environments, one that could create a mapping from what a view returns to what it would equate to in cakephp constructed style model queries.

Re: [professionel] Re: Cake is breaking database views. This looks like a bug.

2007-01-28 Thread Bernard Grosperrin
Chris I have never used an SQL view and would love to see a real-world example of when a view should be used over, say, the CakePHP model combined with associations. That's a pretty typical (and kinda sad) answer from someone with no real sql/ database background, and happy with MySQL,

Re: [professionel] Re: OT - Q for PHPNut on DBDesigner 4 - Was: ER Tools

2007-01-28 Thread Bernard Grosperrin
John I've always had mixed feelings about this: in some ways using triggers, stored procedures and the like seem to me like spreading your application logic in too many places. I can see where they'd be useful though, too. No. ALL the business logic should be where it belongs, with

Re: [professionel] Re: ER Tools

2007-01-28 Thread Bernard Grosperrin
codecowboy wrote: 2 They cannot export the diagrams (typically they can export anything but MySQL 5!!). makes a lot of sense. Before 5, Mysql knew nothing about entity relations. Bernard --~--~-~--~~~---~--~~ You received this message because you are

Re: [professionel] Re: Cake is breaking database views. This looks like a bug.

2007-01-28 Thread Bernard Grosperrin
Kaste when you dont need the modelling-features of a framework because it duplicates your fine SQL-code and you only see a need for the VC of the MVC probably switch to CodeIgniter and query your views and execute your procedures and do the validation in the controller. I have been

Pagination with search

2006-11-15 Thread Bernard Grosperrin
OK, I guess I don't know enough to do what I want to, so I am running around in circles. I have a view, with a form sending request parameters to the same view. Works fine, build my query and display results OK. BUT, if I have more than one page of results, a click on next page, as it call

Re: [professionel] RE: Retrieve URL?

2006-11-13 Thread Bernard Grosperrin
Mariano Iglesias wrote: Please post this message on its own thread. I have a possible solution but it wouldn't be polite to the other readers of this thread to completely change the subject this thread was about. Sorry, did not realize I did that!~~- Bernard

Retrieve URL - New thread.

2006-11-13 Thread Bernard Grosperrin
I would like to improve my rather crude login system. For now, after login, I redirect the user to '/', or the Home page. I would like to trap or retrieve the URL the user intended to go to, pass it as parameter to my login function, to redirect to this URL instead of Home. Is there a way to

Mysteries with findAll ???

2006-11-07 Thread Bernard Grosperrin
OK, I don't get it!!! The SQL code generated looks OK, but I don't get the results...! I am sure there is (are) better ways, I am still discovering cake (and PHP, BTW)! Here is the request generated (got it through debug): SELECT Stock.product_id AS Stock__product_id, Stock.location_id AS

Re: [professionel] Mysteries with findAll ???

2006-11-07 Thread Bernard Grosperrin
As an answer to myself, further tests with postgresql let me see that I need to replace the first left join by an inner join SELECT Stock.product_id AS Stock__product_id, Stock.location_id AS Stock__location_id, Stock.on_hand_units AS Stock__on_hand_units, Stock.committed_units AS

Re: [professionel] Re: composite query

2006-11-02 Thread Bernard Grosperrin
Tim It sounds to me like you could use arrays, which may negate the need for all of these elseif's that you describe... maybe combined with a foreach statement, building the query up inside there? Thanks you, that make sense, I will look at this. Your second point, I'm not sure I

Re: [professionel] Re: Component problem.

2006-11-01 Thread Bernard Grosperrin
[EMAIL PROTECTED] wrote: Maybe startup is not the best method to set a controller variable in. Are you sure startup is even being called? I would not get an error if it was not called. Bernard --~--~-~--~~~---~--~~ You received this message because you are

Re: [professionel] Re: Component problem.

2006-11-01 Thread Bernard Grosperrin
meek Yes you would - you don't need to call a function to 'create' an 'Undefined variable' - the previous poster was correct - the first thing you should do is make sure that the startup function is being called. I realized that after my post. Thanks for your help, Bernard

composite query

2006-10-31 Thread Bernard Grosperrin
I have 2 problems I need help with, but I will post 2 messages. first: What would be the best way to have an interactive query? I need to have users able to make a selection in 6 different columns, to build a query with WHERE this and that (6 this and that..), knowing they may select 1, or 2,

Component problem.

2006-10-31 Thread Bernard Grosperrin
Ok, I have made couple of components working well, but this one give me a error all the time, and I am unable to see what's wrong: class StockRequestComponent extends Object { var $controller = true; // I have to find a way to have a function here which can receive

Re: [spam] Re: How to test for the current model?

2006-08-22 Thread Bernard Grosperrin
Mikee $this-controller so you can check for the controller name if ($this-controller-name == 'Blahs') { display } or for the modelClass if ($this-controller-modelClass == 'Blah') { display } Cool, thanks, it help! Bernard

How to test for the current model?

2006-08-21 Thread Bernard Grosperrin
I need some help with something which looks like the cat chasing it's tail, to me, but I am a beginner! I have a component which I call from the default.thtml view, as I want it in a sidebar, and that is defined there. But in fact, I would like that component displayed/active only when the

Custom SQL Requests?

2006-08-10 Thread Bernard Grosperrin
Very new, trying to learn and understand. What is the proper way to have my own SQL Statements? For example, if I want to add ORDER BY, or GROUP BY, etc.. Have been trying to search for Custom SQL, but have not found what I was looking for. Thanks for any hint, Bernard

Re: [spam] Re: Custom SQL Requests?

2006-08-10 Thread Bernard Grosperrin
John David Anderson (_psychic_) wrote: You can always use query() and execute() for custom SQL, though I'd probably stick to the model functions as often as I could. -- John Ok, excellent! Thanks very much for the fast answer, John! Bernard

Re: New to CakePHP and already a problem!

2006-08-09 Thread Bernard Grosperrin
nate , You're new to Cake and you already have a problem? Is that surprising because you'd have expected to encounter a problem after having used it for longer? I'd guess that it's more the other way around: you haven't used it long, therefore you're inexperienced in addressing issues with

The Cake Blog Manual, section 8

2006-08-09 Thread Bernard Grosperrin
I have my list of Blog entries displayed nicely, after modifying routes.php as instructed. But when adding the view action, I get this error: Bad Request Your browser sent a request that this server could not understand. I am pretty sure I have to modify routes.php to take into account

New to CakePHP and already a problem!

2006-08-08 Thread Bernard Grosperrin
Hello, I am new and try to discover CakePHP. It seems I have a problem with my paths. I am on windows XP with PHP 5.1.4 and Apache 2.0 SSL here is my directory structure on disk: C:\ ApacheSSL htdocs cake app config