Re: check querystring

2010-04-13 Thread cricket
On Apr 13, 1:56 pm, mdb meena.d...@gmail.com wrote: Hello All, In my view.ctp i want check if a particular querystring is present, if so then need to assign that value to a local variable. Ex the url may or may not have the querystring 'eventid', If its present then assing to local

Re: Disabling form text editor

2010-04-13 Thread Dewayne Pinion
Greetings, and thanks for the response. I did catch that about the field names and have set them to a more appropriate varchar data type. It looks like the issue actually came down to one of cache for the app. I cleared out the files and after doing so (which changing those fields might have had

Re: Help with recursive find

2010-04-13 Thread cricket
On Apr 13, 4:48 pm, Rafael Cesar rafa...@gmail.com wrote: Hey.. What's up guys..? I'm just beggining with Cake, and I'm still getting used to the MVC architecture... So.. right now I'm facing a problem and I really need your help.. There's the thing.. I have the table Stores

Re: Integration with Eclipse problem

2010-04-13 Thread Graham Weldon
Are you looking to work with the Cake PHP Core itself? or to work on apps that use the core? If you are looking to work on applications, I would suggest doing a project bake from the console, and using the result of that as your project contents to begin. This will remove all the core classes

Re: model for different role users

2010-04-13 Thread cricket
On Apr 13, 2:44 am, iqbal-san isant...@gmail.com wrote: Hello, I'm wondering how best to define the models for users with roles, where I want to save a different set of data for each role.  Plus, there will be relationships between the roles.  For example, there is user type student and user

Re: Database sessions in version 1.3

2010-04-13 Thread zonery
thank you for your interest. its better to continue with ver.1.2.6... because I am newcomer and the book is very important for me.. it seems ver.1.3 book must be updated.. thank you again... On 14 Nisan, 04:20, jacmoe jac...@mail.dk wrote: It's cake schema create Session, isn't it? On Apr 14,

Re: Database sessions in version 1.3

2010-04-13 Thread Jeremy Burns
Sorry for some apparent confusion. I checked one of my sites when producing that information and it was there. Must have been a hangover from a previous version. I also checked various release candidate folders and it does indeed seem to have moved. Anyway - on 1.3 RC4 the files are in:

Re: Database sessions in version 1.3

2010-04-13 Thread jacmoe
I checked, and running 'cake schema create Sessions' does create a cake_sessions table in your database. You can do this! :) That book is actually fairly up to date and complete. :) Beware that in two weeks time, CakePHP 1.3 will become the current stable version. So you better get used to it. On

table naming convention

2010-04-13 Thread Master Ram
hi.. my table Name:adb_users this is my: view form: h3Register/h3 ?php echo $form-create('adb_', array('action' = 'register'));? ?php echo $form-input('username');? ?php echo $form-input('password');? ?php echo $form-input('email');? ?php echo $form-input('date');? ?php echo

Re: SQL injection protect

2010-04-13 Thread Sergei
Dmitry, use updateAll() for your task. For other custom queries using query() you need to sanitize data manually. On Apr 13, 1:10 am, Dmitry Shevchenko dmitr...@gmail.com wrote: Hi everyone! As I read documentation Cake automatically clean user input and we can use save() and find() with

Re: need help saving cross reference table

2010-04-13 Thread WebbedIT
Hi, You'd pass the event_id to the controller action by including it inn the url: $html-link('Register', array('controller'='events', 'action'='register', $row['Event']['id']), array('title'='Register for '.$row['Event']['title'])); The above link would expect to find an action in the Event

Re: using Cake data in external script

2010-04-13 Thread WebbedIT
If this data is to be used in an external website/script then you may want to export it to XML to be read periodically or create a RESTful web service? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message

Re: $html-link() on button

2010-04-13 Thread sn1987a
Hi, I've try this and it works: $this-Form-button('button_text', array('onclick' = location.href='.$this-Html-url($url).')); /** * *$url = array( * 'controller' = '...', * 'action' = '...', * param1, * *); * */ -- View this message in context:

Re: Inluding a pseudo field in a Model and sort on it

2010-04-13 Thread Alterego
Thank you for your replies. I use the new 1.3 virtual field now, and it works perfectly! On 13 apr, 01:27, jacmoe jac...@mail.dk wrote: I had the same problem yesterday, and had to manually massage the data into a data array, but that was because I had (and still have) three computed fields.

Database sessions in version 1.3

2010-04-13 Thread zonery
hi all, I want to store sessions in database. in 1.3 manual (http://book.cakephp.org/view/1310/Sessions), it says ...run the database session SQL file located in app/ config... but there is no database session sql file in app/config how can I create session database table (or get schema)? can I

model for different role users

2010-04-13 Thread iqbal-san
Hello, I'm wondering how best to define the models for users with roles, where I want to save a different set of data for each role. Plus, there will be relationships between the roles. For example, there is user type student and user type teacher, where a teacher have many students. Both type

Re: Manipulating Data Based on Non Related Model Data

2010-04-13 Thread iqbal-san
I'm also still learning this MVC concept. I thought that a model should only do things (functions/process data) that is from it's own table? (Or doI still not quite get it?) I find that usually I put processes that need data from different tables (models) into the controllers, so my controllers

Re: Database sessions in version 1.3

2010-04-13 Thread Jeremy Burns
It's in /app/config/sql/sesions.sql Jeremy Burns jeremybu...@me.com On 13 Apr 2010, at 04:52, zonery wrote: hi all, I want to store sessions in database. in 1.3 manual (http://book.cakephp.org/view/1310/Sessions), it says ...run the database session SQL file located in app/ config...

Re: Manipulating Data Based on Non Related Model Data

2010-04-13 Thread Jeremy Burns
If you set up your model associations correctly (http://book.cakephp.org/view/1039/Associations-Linking-Models-Together) you can access related data and functions from within a model. Associations mirror your table relationships. For example, if you are in the Post model and want to access a

hash password

2010-04-13 Thread Ambika Kulkarni
Hi, I want to change the password encryption type. How to do that. I want to change it to MYSQL PASSWORD. Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google

Re: hash password

2010-04-13 Thread Hani Sana
First to plz tell me ur last pr solved how it , Sorry for not further comment. if u use Auth component used this in ur controller $this-Auth-password( ); if not so simply use md5($this-data['User']['password']); when u registered ; ok Bye. Check out the new CakePHP Questions site

RE: Controller Error, Reserved Name?

2010-04-13 Thread Johnathan Iannotti
Anyone have any input on this? -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of JNotti Sent: Monday, April 12, 2010 1:43 PM To: CakePHP Subject: Controller Error, Reserved Name? Running the latest stable version 1.2.6 I am following

Re: setting habtm checkbox options class name

2010-04-13 Thread WebbedIT
That sets all of the checkboxes to the same class though.  what if i want to give the checkboxes for administrators an admin class, moderators get a mod class, authors get a author class etc To apply different rules to subsets of your checboxes you would have to loop through your option array

Re: CakePHP 1.3.0-RC4 has arisen

2010-04-13 Thread genellern
hey!! im trying cake 1.3 from beta version and i must say that its really cool im waiting now for 1.3.0 version !!! On 12 abr, 21:32, mark_story mark.st...@gmail.com wrote: The CakePHP development team is happy to announce the release the CakePHP 1.3.0-RC4. This release marks the last release

Re: save extra data in join table

2010-04-13 Thread WebbedIT
You should not be using both the HABTM method and the hasMany/ belongsTo methods at the same time otherwise how do you structure your data arrays to use saveAll etc? Both types of association will try there own saves and want their own versions of the data array?!? HTH Paul. Check out the new

Re: SQL injection protect

2010-04-13 Thread Dmitry Shevchenko
Thank you Sergei. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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

Re: SQL injection protect

2010-04-13 Thread Dmitry Shevchenko
Sergei I think updateAll didn't sanitize data - http://book.cakephp.org/view/75/Saving-Your-Data or I'm wrong? mayde it's better to set id and then save data //Update: id is set to a numerical value # $this-Recipe-id = 2; # $this-Recipe-save($this-data); but the questions is still open.

Re: Controller Error, Reserved Name?

2010-04-13 Thread Dr. Loboto
cricket already told you - there are model named Email and component named Email and they conflict. Rename your model. On Apr 13, 8:52 pm, Johnathan Iannotti jo...@blueclover.com wrote: Anyone have any input on this? -Original Message- From: cake-php@googlegroups.com

RE: Controller Error, Reserved Name?

2010-04-13 Thread Johnathan Iannotti
That's what I thought, didn't see cricket's response, thanks guys! -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of Dr. Loboto Sent: Tuesday, April 13, 2010 10:32 AM To: CakePHP Subject: Re: Controller Error, Reserved Name? cricket

Re: save extra data in join table

2010-04-13 Thread cricket
On Apr 13, 10:29 am, WebbedIT p...@webbedit.co.uk wrote: You should not be using both the HABTM method and the hasMany/ belongsTo methods at the same time otherwise how do you structure your data arrays to use saveAll etc?  Both types of association will try there own saves and want their own

News with Comments - how to sort by comments count?

2010-04-13 Thread mpeshev
Hi, I have a relationship 1:m for news with comments. I try to sort the news by comments count. I am able to filter all the news in many ways, also to get the $this- News-Comment-find('count') for the comments count. How could I extract the 10 most commented news after all? Check out the new

Disabling form text editor

2010-04-13 Thread Dewayne Pinion
Not sure what you call those editors, but anyway. I have an application that has the following: ?php echo $form-input('Product.name', array('label' = 'Name:', 'class' = 'text'))? ?php echo $form-input('num', array('label' = 'Number:', 'class' = 'text'))? ?php echo $form-input('model_name',

Re: need help saving cross reference table

2010-04-13 Thread mdb
Hello Paul, Thanks you so much for the reply, that worked. On Apr 13, 2:12 am, WebbedIT p...@webbedit.co.uk wrote: Hi, You'd pass the event_id to the controller action by including it inn the url: $html-link('Register', array('controller'='events', 'action'='register',

check querystring

2010-04-13 Thread mdb
Hello All, In my view.ctp i want check if a particular querystring is present, if so then need to assign that value to a local variable. Ex the url may or may not have the querystring 'eventid', If its present then assing to local variable otherwise no action Thanks in advance Check out the

Sample files?

2010-04-13 Thread Validatorian
I found a link for 'test cases' leading to '/test' which was a broken link -- could anyone help me out with a link to where I can find complete cakePHP code for applications? For what it's worth, I'm currently working out how to design my code to support modular plugins -- I want to just be able

multi-language content

2010-04-13 Thread dole.doug
hi there does anyone knows how can i make a website with a multi-language content support? I need to translate the content and not the interface. Do you know about such a link( tutorial, plugin, anything )? Check out the new CakePHP Questions site http://cakeqs.org and help others with their

Re: News with Comments - how to sort by comments count?

2010-04-13 Thread Jon Bennett
Hi, I use http://pastie.org/918145 to get categories, ordered by the categories with the most articles - the same thing can be applied to your situation without too much fuss. hth Jon On 13 April 2010 18:40, mpeshev nofear...@gmail.com wrote: Hi, I have a relationship 1:m for news with

Conflicting forms

2010-04-13 Thread Ed Propsner
At one point during the test site I'm working on I end up with two forms on the same page that both use the same model. One form is for registration and the other is to log in ... both forms contain a username and password field. Having these two forms contain the same field names is causing a

Re: Conflicting forms

2010-04-13 Thread jacmoe
If you rename the model name in your registration form, to 'loginUser', the data you will get would be data['loginUser'] ['username'], etc. You just need to map that to the User model after receiving the data. AFAIK, you don't have to pass a model name to a form. On Apr 13, 11:21 pm, Ed Propsner

Re: multi-language content

2010-04-13 Thread jacmoe
You could look into using the translate behaviour. :) http://book.cakephp.org/view/1328/Translate On Apr 13, 8:42 pm, dole.doug dole.d...@gmail.com wrote: hi there does anyone knows how can i make a website with a multi-language content support? I need to translate the content and not the

Re: Database sessions in version 1.3

2010-04-13 Thread jacmoe
I submitted a change to the page in question. On Apr 13, 1:32 pm, Jeremy Burns jeremybu...@me.com wrote: It's in /app/config/sql/sesions.sql Jeremy Burns jeremybu...@me.com On 13 Apr 2010, at 04:52, zonery wrote: hi all, I want to store sessions in database. in 1.3 manual

Multiple prefix routes. Second route not working.

2010-04-13 Thread Bryan Paddock
Hey all, I have an application that has been running for a while using admin routing. There are normal users as well as admin users. Now the application is growing and I need to create separate judging routes for judges that will log in and moderate the submissions. In my *core.php* I have the

Re: Conflicting forms

2010-04-13 Thread Ed Propsner
Well that was a simple enough solution and of course the only thing I didn't try :) Thank you. On Tue, Apr 13, 2010 at 6:47 PM, jacmoe jac...@mail.dk wrote: If you rename the model name in your registration form, to 'loginUser', the data you will get would be data['loginUser'] ['username'],

Re: Blog Tutorial query problem

2010-04-13 Thread Edward
Jeremy Thanks so much. It really helped. Edward Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this

Re: Database sessions in version 1.3

2010-04-13 Thread zonery
dear Jeremy Burns, I am not asking about version 1.2.6... My question is about version 1.3 and there is no sql folder under /app/config/... I download ver.1.3 now, and checked again... there is no sql folder and sql file... there is only schema folder under /app/config/ could you look again and

Integration with Eclipse problem

2010-04-13 Thread Edward
Hello I'm a newbie but finally getting the hang of CakePHP and loving it now. I was following an article By Michael McAndrew on how to set up eclipse to work with cakephp. http://bakery.cakephp.org/articles/view/setting-up-eclipse-to-work-with-cake Then, I encountered a problem which I haven't

Help with recursive find

2010-04-13 Thread Rafael Cesar
Hey.. What's up guys..? I'm just beggining with Cake, and I'm still getting used to the MVC architecture... So.. right now I'm facing a problem and I really need your help.. There's the thing.. I have the table Stores (id,name,city_id,...) Cities (id,state_id,name) States (id,name) So.. What I

Re: SQL injection protect

2010-04-13 Thread Sergei
Dmitry, don't think, look at the source :) updateAll is exactly the answer. Your validation routine seems too heavy for one number. And you don't have to create a component to validate some data manually. You can always validate in controller. On Apr 14, 12:15 am, Dmitry Shevchenko

Re: Database sessions in version 1.3

2010-04-13 Thread jacmoe
OMG you are right. :) I guess I have to take back my change then.. Use the console. cake schema some_command session ?? I am not sure.. I thought it was still there, but it isn't. It was left over from when I upgraded from 1.2.x There's no information in the book about that. On Apr 14, 2:13 am,

Re: Database sessions in version 1.3

2010-04-13 Thread jacmoe
It's cake schema create Session, isn't it? On Apr 14, 2:13 am, zonery ikiz...@gmail.com wrote: dear Jeremy Burns, I am not asking about version 1.2.6... My question is about version 1.3 and there is no sql folder under  /app/config/... I download ver.1.3 now, and checked again... there is no

Re: Disabling form text editor

2010-04-13 Thread cricket
On Apr 13, 1:46 pm, Dewayne Pinion dpin...@gmail.com wrote: Not sure what you call those editors, but anyway. I have an application that has the following: ?php echo $form-input('Product.name', array('label' = 'Name:', 'class' = 'text'))?   ?php echo $form-input('num', array('label' =