deleting records using a checkboxes

2007-07-13 Thread hashkash
Hi, The user selects multiple checkboxes and hits the delete button to delete. Thats where i get stuck. Just to check if i can get the values of the checkboxes i did this. My checkbox name is the user id itself. function delete() { $j=1;

Re: searching records between 2 dates

2007-07-11 Thread hashkash
my mistake, i got it working now. --~--~-~--~~~---~--~~ 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

searching records between 2 dates

2007-07-10 Thread hashkash
Hi! I want to search for records between 2 dates. This is what i have done but it doesnt seem to work $date1=$this-data['Equipment']['dop1']; $date2=$this-data['Equipment']['dop2']; $conditions['Equipment']['dop']=BETWEEN {$date1} AND {$date2}; also $warranty=$this-data['Equipment']['dow'];

Re: searching records between 2 dates

2007-07-10 Thread hashkash
I checked the sql that executes and the dates dont seem to be included. why is this? hoping for some help thanks! kashyap --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send

search only entered fields

2007-07-09 Thread hashkash
Hi! I searched the group for my problem but in vain. Sorry if this is redundant. I have created a search form having 4 fields to be filled up. I would like to base my search only on fields that have been filled up.With my current findall() Im not able to do so. How do I build the array

Re: search only entered fields

2007-07-09 Thread hashkash
Thanks alot people! Its working now. Cheers! Kashyap --~--~-~--~~~---~--~~ 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,

Search using values from a multiple select option

2007-06-06 Thread hashkash
Hi! I have a multiple select option where the use can select 1 or more owners. I need to query the database based on the owners selected. There was an article i read

Re: Search using values from a multiple select option

2007-06-06 Thread hashkash
Thanks alot for the help on the OR condtions,but my problem related to the checking the owners is based on the number of owners the user selects.I cant code it directly.Its based on user selection. Any idea? Thanks! Kashyap --~--~-~--~~~---~--~~ You received this

Re: Search using values from a multiple select option

2007-06-06 Thread hashkash
from a multiple select option. Im not using a findAll() but using a query() because when i used the findall()before posting on this group i got a few errors. so im using the query(). Kashyap On Jun 6, 12:37 pm, AD7six [EMAIL PROTECTED] wrote: On Jun 6, 9:32 am, hashkash [EMAIL PROTECTED] wrote

Re: Search using values from a multiple select option

2007-06-06 Thread hashkash
here is a part of the controller code http://bin.cakephp.org/view/486635630 --~--~-~--~~~---~--~~ 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

Querying values from a form

2007-05-31 Thread hashkash
Hi, here is the link to my code. http://bin.cakephp.org/view/1152843346 I need to query the database based on the data the user enters. I have a multiple select and a few checkboxes. The multiple select is to query the database with equipment having owner names as those selected. the checkbox is

using select tag

2007-05-29 Thread hashkash
Hi! I need to populate my drop down list with only owners and only incharge users from my users table. The Users table username,password,first_name,owner,incharge,etc. where owner and incharge are boolean fields to render the user as an owner or incharge or both. How do i populate the

Re: using select tag

2007-05-29 Thread hashkash
hey! thanks alot for the help,will try it out once i get back to work tom. But im guessing this solves my problem. Thanks mate! Cheers! Kashyap On May 30, 12:44 am, Walker Hamilton [EMAIL PROTECTED] wrote: look into using the form-input function.

Conditional SelectTag

2007-05-28 Thread hashkash
Hi, I need to create a drop down list which shows a list of owners. I have a users table which indicates whether a users is an owner or an incharge person. The owner and incharge fields are boolean fields i.e owner field is 1 means owner,so on and so forth. THere is another table called

Problem displaying results using findBy()

2007-05-28 Thread hashkash
Hi, THis is my findBy() $this-set('owners', $this-User-findByUsername($username, null, null, 1)); I use the var_dump($owners) to display the values in the form of an array.Which displays the right data.I cant figure out how to display this in the form of a table with select fields only. The

Displaying the array

2007-05-28 Thread hashkash
] = Array ( [id] = 1 [username] = hashkash [password] = 7d7982cc30b26508c71c10836ec12840 [email] = [EMAIL PROTECTED] [first_name] = Kashyap [last_name] = Thimmaraju [last_login] = 2007-05-29 04:18:36

SQL or Cakephp

2007-05-26 Thread hashkash
HI, I have 2 models User and equipment(the owner is a field in the user table). user hasMany equipment equipment belongsTo user equipment hasOne owner. I need to display all equipment that a user owns when he logs in. Even if I were to specify it in the conditions part of the association how

Re: SQL or Cakephp

2007-05-26 Thread hashkash
class User extends AppModel { var $name = 'User'; var $primaryKey = 'username'; var $hasMany = array ('Equipment'= array('className' = 'Equipment', 'conditions'= 'Equipment.owner='$logged_in_username', how do I get this

Associating 2 or more models

2007-05-22 Thread hashkash
Hi, I cant get my model association working.Im going through the manual but Im not able to figure out where im going wrong. I have a User model = username,password,id,type(owner/incharge/both) and email. primary key - id then there is an Equipment model = type(product type),equipment

Inventory management using cakephp

2007-05-22 Thread hashkash
Hi! Im in quite a fix. I have created 2 tables as of now users username,id,password,name,type(owner/incharge/both),email Primary key - id equipment type,equipmentno,owner,incharge,dateofpurchase Primary key - equipmentno Foreign Keys - owner and incharge. The User hasMany Equipment.Equipment can

Model association problem

2007-05-22 Thread hashkash
Hi! Im in quite a fix. I have created 2 tables as of now users username,id,password,name,type(owner/incharge/both),email Primary key - id equipment type,equipmentno,owner,incharge,dateofpurchase Primary key - equipmentno Foreign Keys - owner and incharge. The User hasMany Equipment.Equipment can

Inventory management using cakephp

2007-05-22 Thread hashkash
Hi! Im in quite a fix. I have created 2 tables as of now users username,id,password,name,type(owner/incharge/both),email Primary key - id equipment type,equipmentno,owner,incharge,dateofpurchase Primary key - equipmentno Foreign Keys - owner and incharge. The User hasMany Equipment.Equipment can

Model Associations

2007-05-19 Thread hashkash
Hi people! Im new to cake.Im developing an inventory mangement system and would like to know how to go about the model associations. I have a users table which has a list of registered users. Then there is a table called owners,which has the owner name and his equipment. I would like to create an