Jump to content

roseman5544

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

roseman5544's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hi...again got in a mess...i m developing this ticketing system where once i check the checkbox and press the edit button,it takes me to the edit page with the same ticket no to be printed there....how do i do this i have attached the two pages for your smooth understanding attachment 1-->page where i check the ticket no from a list of ticket nos attachment2-->page where the ticket no must be displayed as checked on the previous page help is appreciated in advance.... [attachment deleted by admin]
  2. hi...thanks a lot for your reply....i ll just go through the same and reply back...if needed
  3. hi guys....i have a doubt on the checkbox use and validation in php.... how do you enable one checkbox and once it is checked the others would be disabled automatically....... is this possible in php or do we use javascript.... ur guidances and help is appreciated in advance
  4. Hi....thanks a lot for your help...but my $var6 value is not coming withing the query: $var6=$_POST[$_SESSION["empId"]]; echo $var6; $where = ''; how do i fetch the session emoid into the $ variable..... i have also tried $var6=$_REQUEST[$_SESSION["empId"]]; All Help would be appreciated...
  5. Hi...you r superb thaks a lot it worked...now i am trying to add another part in this that is of a session id....an employee session id....which would match with the actual creator of the tickets.....the query is as follows: $var6=$_POST[$_SESSION["empId"]]; echo $var6; $where = ''; $qry = "SELECT * FROM tickets"; if (!empty($var1)) $where .= (empty($where) ? "WHERE " : "AND ") . "ticket_id = '$var1' "; if (!empty($var2)) $where .= (empty($where) ? "WHERE " : "AND ") . "dept_id = '$var2' "; if (!empty($var3)) $where .= (empty($where) ? "WHERE " : "AND ") . "proj_id = '$var3' "; if (!empty($var4)) $where .= (empty($where) ? "WHERE " : "AND ") . "status = '$var4' "; if (!empty($var5)) $where .= (empty($where) ? "WHERE " : "AND ") . "severity = '$var5' "; if (!empty($var6)) $where .= (empty($where) ? "WHERE " : "AND ") . "creator_id = '$var6'"; this doesnot execute.....can u please help me out..... my problem is that the creator of the tickets and the currently logged in employee must be the same....
  6. Hi...firstly thanks a lot for your reply....this query has been executed by me....it works for individual search but when u select two criterias or more....i.e if we select $var1 and $var2 which have a match in the database.....the query reports an error... My executed query is: $where = ''; $qry = "SELECT * FROM tickets "; if (!empty($var1)) $where = (empty($where) ? "WHERE " : "OR ") . "ticket_id = '$var1' "; if (!empty($var2)) $where = (empty($where) ? "WHERE " : "OR ") . "dept_id = '$var2' "; if (!empty($var3)) $where = (empty($where) ? "WHERE " : "OR ") . "proj_id = '$var3' "; if (!empty($var4)) $where = (empty($where) ? "WHERE " : "OR ") . "status = '$var4' "; if (!empty($var5)) $where = (empty($where) ? "WHERE " : "OR ") . "severity = '$var5' "; $qry .= $where; $result=mysql_query($qry) or die(mysql_error()); the error i am receiving on echoing the query for any two options selected(here i have selected 18 as my ticket no and project id is 4) is: 184You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OR proj_id = '4'' at line 1
  7. Hey Guys.....I would really appreciate all if you guys could help me on this.. i am developing a work order aka business ticketing system where i have to search the tickets based on the given criteria of: ticket no or department name or project name or the status of the ticket or severity of the ticket... i have written the query as $qry = "SELECT * FROM tickets WHERE ((ticket_id='$var1') OR ('$var1' IS NULL)) and ((dept_id='$var2') OR ('$var2' IS NULL)) and ((proj_id='$var3') OR ('$var3' IS NULL)) and ((status='$var4') oR ('$var4' IS NULL)) and ((severity='$var5') oR ('$var5' IS NULL))"; 1. if i have a value for var1==15 inserted and the values of var2 to var5 are null, the whole query gives zero rows 2 If I have values for var1 till var4 but one null for the var5 still query result is zeros I need to make the condition work only where value is not null otherwise condition should be avoided Is there any way - please write the query for me - EDIT - I am working in PHP
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.