Jump to content

shan_cool

Members
  • Posts

    53
  • Joined

  • Last visited

    Never

Everything posted by shan_cool

  1. Hi,       Thanks Verymuch for ur reply.. The Query works fine.. Rgds, Shan
  2. hi,     I have tried that too. it displays the same numbaer of repeated records ony... any other way?
  3. Hi all,         I have two tables "table1" and "table2" and "id" is the field common to both the tables..  All id data will be in "table1" say 10,20,30,40,50,60  . but only few of them will get stored in "Table2" say 20 ,40. Now i need the retrieve the values of id's that are in "table1" and not in "table2" Ex: 10,30,50,60. My query is "Select h1.id from table1 h1,table2 h2 where h1.id Not In(h2.id)" "Select h1.id from table1 h1,table2 h2 where h1.id <>2.id)" both display Repetition of all values and gives me 'n' number of records.. cartesian product plz lemmme know how to do it? Thx in advance, Shan
  4. Hi all,          I have three objects.  1st-Combo(Date) , 2nd-Combo(Date) and 3rd-Text Box...  My requirement is-- On onchange event of 2nd combo, i need to display the difference between the two dates in the 3rd-Text box field. Plz lemme know how to get the combo1 and combo2 values in a php variable and calculate , thn printing on text box.. Thx in advance, Shan
  5. Hi All, I have development a defect Tracking tool,So when i raise a defect i need to intimate the respective person through a mail offically..How can i do that in PHP.I am using MYSQL as my backend. Thanks, Shan
  6. Hi all, I have a mysql field with following data: TS_SAM_UA_1 TS_SAM_UA_5 TS_SAM_UA_2 TS_SAM_UA_11 TS_SAM_UA_10 TS_SAM_UA_14 I am Populationg all these values in a combo box... my query is Select (Emp_Id + 0) as int_id From HR_Emp_Det order by int_id it displays as TS_SAM_UA_1 TS_SAM_UA_10 TS_SAM_UA_11 TS_SAM_UA_14 TS_SAM_UA_2 TS_SAM_UA_5 but i need it as TS_SAM_UA_1 TS_SAM_UA_2 TS_SAM_UA_5 TS_SAM_UA_10 TS_SAM_UA_11 TS_SAM_UA_14 Rgds, shan
  7. Hi, I have a drop down box named sev-stands for severity,This code comes in the modify screen where i retieve severity from dt_defect table.I have a master table where i store all the severity dt_admin. code: // The below query is to retireve the severity for the defect raised <? $rs = mysql_query("select * from dt_defect where defect_id='$id'",$connection)or die ("q1"); $myrow=mysql_fetch_array($rs) ?> <select style="border-style:none; FONT-SIZE: 10pt; WIDTH: 137px; COLOR: #222222; " name="sev" style="font-size: 10pt" > <OPTION Readonly value="<?php echo $myrow["def_severity"]; ?>"><?php echo $myrow["def_severity"]; ?></OPTION> <?php // The below query is to display all the diff caterory of severity,so tht the user can change the severity. $query=mysql_query("SELECT name FROM dt_admin where category='sev'",$connection ) or die ("cant do it"); while ($result=mysql_fetch_array($query)) { echo '<option value="' . $result['name'] . '">' . $result['name'] . '</option>'; } ?> now my pblm is if the severity for eg for the defect is A,Then There is one A displayed in the combo box and then when i click the combo box there are 2 A's displayed in the drop down. How can i display only one A in the combo box? Thanks for the reply, Shan.
  8. Hi all, I am using PHP with MYSQL to develop a tool,I have to load my combo boxes with values from backend.I have no pblm in ADD screen,In my MODIFY screen while printing the values in the combo box i get the value displayed once in the box and twice in the drop down how can i avoid this? Please let me know if u need any clarifications.. Thanks Shan
  9. Hi all, I want to implement Sub menus in PHP,How can i do it? Thanks, Shan_cool
  10. Hi all, I am in need to implement a query engine. i hav a large text area in a Php page where i write queries and am getting it through POST in my second Php page... But it throws me error message when i write update quueries or i write select using where clause.. but simple select queries r being executed.. tell me how to implement it.. any idea? Thx in advance, Shan.
  11. shan_cool

    initcap

    Hi All, Is it possible for me to use init cap in MYSQL 3.23 Thanks shan
  12. shan_cool

    sub menu

    hi all, I am implementing 3 level horizantal hierachy sub menu in my application all the levels works fine expect when i select 2 level and 3 level comes out but there is a gap between the 2 and 3 level hierarchy. My code is as follows: <html> <head> <title>Horizontal CSS (cascading style sheet) Menu</title> <link rel="stylesheet" type="text/css" href="../Styles/EXPack/Style.css"> <style> #menu ul { margin: 0; padding: 0; list-style: none; } #menu li { /* all list items */ float: left; position: relative; width: 7.45em; } #menu li ul {/* second-level lists */ position: absolute; display: block; top: 2em; left: 0; } #menu li>ul {/* to override top and left in browsers other than IE */ top: auto; left: auto; } #menu li ul li ul {/* third-level lists */ position: absolute; display: block; top: 0; left: 9em; } /* Fix IE. Hide from IE Mac \*/ * html #menu ul li { float: left; height: 1%; } * html #menu ul li a { height: 1%; } /* End */ #menu li:hover ul { display: block; } #menu li:hover>ul { visibility:visible; } #menu ul ul { visibility:hidden; } /* Make-up syles */ #menu ul, li { margin: 0 0 0 0; } /* Styles for Menu Items */ #menu ul a { display: block; text-decoration: none; color: #777; background: red; /* IE6 Bug */ padding: 5px; border: 1px solid #ccc; } /* Hover Styles */ #menu ul a:hover { color: #E2144A; background: red; } /* Sub Menu Styles */ #menu li ul a { text-decoration: none; color: #77F; background: #fff; /* IE6 Bug */ border: 1px solid #ccc; padding: 5px; } /* Sub Menu Hover Styles */ #menu li ul a:hover { color: #E2144A; background: #f9f9f9; } /* Icon Styles */ #menu li a.submenu {background:#fff url("arrow.gif") no-repeat right; } #menu li a.submenu:hover {background:#f9f9f9 url("arrow.gif") no-repeat right;} #menu li ul a.submenu {background:#fff url("arrow.gif") no-repeat right;} #menu li ul a.submenu:hover {background:#f9f9f9 url("arrow.gif") no-repeat right;} </STYLE> <script> startList = function() { //code only for IE if(!document.body.currentStyle) return; var subs = document.getElementsByName('submenu'); for(var i=0; i<subs.length; i++) { var li = subs[i].parentNode; if(li && li.lastChild.style) { li.onmouseover = function() { this.lastChild.style.visibility = 'visible'; } li.onmouseout = function() { this.lastChild.style.visibility = 'hidden'; } } } } window.onload=startList; </script> </head> <body> <div id="menu"> <ul id="menuList"> <li><a class="submenu" name="submenu">HR</a> <ul> <li><a class="submenu" name="submenu">Employee</a> <ul ><li><a href="hr_info_entry.php">Add</a></li> <li><a href="hr_info_modify.php" >Modify</a></li> <li><a href="" >Delete</a></li></ul> <li><a class="submenu" name="submenu">Passport</a> <ul ><li><a href="hr_pass.php">Add</a></li></ul> <li><a href="construct.php">Join</a> <li><a href="construct.php">Increment </a> <li><a href="construct.php">Time Sheet</a> <li><a href="construct.php">Leave </a> <li><a href="construct.php">Resignation</a> <li><a href="hradmin.php">HR Admin</a> </li> </ul> </body> </html> Can anybody help me, Thanks, Shan_cool
  13. Hi All, I am designing a form which has 3 text boxes and 21 combo boxes.It is a search engine where none of the fields are mandatory.I am using PHP with MYSQL 3.23,The purpose of this form is to check for the Employees who have Total Experience,Company experience and other experience.These 3 are Text boxes. The rest 21 combo boxes are various skill rating. Now i have to retrieve the employee Details based on the various combinations of text and combo boxes. As for now i have just tried the below if condition,which works fine php code [code]<?php if( $tot_exp <> NULL  && $mav_exp == NULL && $dev_exp == NULL && $core_banking == NULL....) { $result = mysql_query("SELECT  (TO_DAYS(CURRENT_DATE()) -TO_DAYS(Emp_DOJ))/365 as mav_exp,(TO_DAYS(CURRENT_DATE()) -TO_DAYS(Emp_DOJ))/365 + Test_Exp  as tot_test,h.Emp_DOJ,s.Emp_Id as Emp_Id,s.Emp_Name as Emp_Name,s.Desgn as Desgn,s.Qual as Qual,s.Test_Exp,s.Dev_Exp,s.Other_Exp FROM skill_master s,HR_Emp_Det h where h.Emp_Id =s.Emp_Id and  (TO_DAYS(CURRENT_DATE()) -TO_DAYS(Emp_DOJ))/365 + Test_Exp >='$tot_exp'",$connection) or die ("Can not do it1"); $rs = mysql_num_rows($result); } ?>[/code] but if i consider the above method for various combinations my code becomes very large and write more if conditions... My backend MYSQL does not support Sub queries,Is there anyother way to implement this??? Thanks in advance, Shan [b]EDIT BY OBER: PLEASE USE CODE TAGS WHEN POSTING CODE[/b]
  14. shan_cool

    Date diff

    Hi, Will Date Diff work in MySQL 3.23.58,if so can u please tell me the syntax. Thanks in advance, shan
  15. Hi All, I hav two php pages. i hav set of form objects in first page. i need to pass all those values to the second page and then on cancellation on second page, i need to return the same values to the first page. I implemented it using Post method, but in second page , the page values r not being passed.. I am using "href" to connect second page to the first page... gimme a suggestion Thx in advance, Shan....
  16. Hi, Thanks very much for ur reply,I am printing the value in excel so it rounding off by itself,so how can i do this.. Please help Thnks in Advance, shan
  17. Hi all I want to add 2 fields in PHP and i don't want the output to be rounded off,I need the exact value,say for eg Ist field value is 1.23 and 2nd field value is 2.89 I want the output to be 4.12 not 4 can anybody help me shan
  18. Hi All, I am in need to store and retrieve the photo's/images of employees .. Initially i stored the entire image to the mysql database as a BLOB.... now i hav changed it in a way like... i store only the path of the image and while displaying am giving it in img src and echoing it.. it works fine... I hav two questions here: In my 1st method, Will there be any pbm in storing images as BLOB? coz later i will b storing many number of images. will it affect my database? In the 2nd method, I need to maintain a folder containing the images of all... but thn it should be centralised in the server for all acces.now i hav done it locally(so that i hav to copy that folder to each machine).. how can i implement it? gimme some suggestions.. Rgds, Shan...
  19. Hi all, I am maintaining Employee details form using php with mysql,I need to add a photo for each and every employee. All the photos are there in a folder in the main server,there fore the path is same for all the employees.Except there employee id So how can i implement this? can anybody help me Thanks in advance, Shan
  20. Hi All, I have used Milonic Menus for one of my application,its exactly meets my requirments,the only problem using this Menu is The first main menu,even if i write it as home and also give its respective URL after a second it changes to MILONIC and its URL is going to milonic .com how can i remove it please help me. The menu which i hav used is from the following milonic site [a href=\"http://www.milonic.com/menusample6.php\" target=\"_blank\"]http://www.milonic.com/menusample6.php[/a] the script used is: <script type="text/javascript" src="milonic_src.js"></script> <noscript><a href="http://www.milonic.com/">JavaScript Menus and DHTML Menus Powered by Milonic</a></noscript> <script type="text/javascript"> if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>"); else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>"); </script> Thanks in Advance, Shan_cool
  21. hi All, I am using a js file for a menu and now i want to give access rights to the user who is using it . The script is as follows: <script type="text/javascript" src="milonic_src.js"></script> <noscript><a href="http://www.milonic.com/">JavaScript Menus and DHTML Menus Powered by Milonic</a></noscript> <script type="text/javascript"> if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>"); else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>"); </script> <script type="text/javascript" src="menu_data.js"></script> The menu is available in menu_data.js file with its respective links now how can i implement access rights can anybody help me ? Thanks in advance, shan
  22. Hi All, This validation is for onchange for 3 combo boxes,The funtionatily works fine but wht happens is if i select the project name the value of it is retained in the combo box but if i select the module name the project name and the module name both r refreshed wht shld i do ? the code wht i did is as follows: Javascript code function window_onload() { var qs=location.search.substring(1,location.search.length); var pair = qs.split('='); temp1= unescape(pair[0]).split('+'); temp = unescape(pair[1]).split('+'); if(temp1=="prj_name") { document.form1.prj_name.value=temp; } elseif(temp1=="prd_name") { document.form1.prd_name.value=temp; } } function Project_onblur() { var my_prd= ""; var index1=document.form1.prj_name.selectedIndex my_prd=document.form1.prj_name.options[index1].value window.location= "log_defect_sam3.php"+"?prj_name="+my_prd; } function Product_onblur() { var my_prd1= ""; var index1=document.form1.prd_name.selectedIndex my_prd1=document.form1.prd_name.options[index1].value window.location = "log_defect_sam3.php"+"?prd_name="+my_prd1; } can anybody help me? Thanks shan
  23. Hi All, I have a query and it displays set of records.. but i hav a pbm wit it. there will b one or more records for a particular employee.. but i need to display a single record for each of them which has the maxmimum m.startdate..... my query is select e.Emp_Id,e.Emp_FName,e.Emp_LName,e.Emp_Ug_Deg,e.PG_Deg,e.Emp_Desgn,e.Emp_DOJ,e.Base_Location,e.Emp_Ug_Year,e.PG_Year,i.Emp_Id,i.Test_Exp,i.Dev_Exp,i.Other_Exp,p.Prj_Code,p.Project_Name,p.Client,p.Location,m.Prj_Code,m.Emp_Id,m.Start_Date,m.End_Date,m.cty from HR_Emp_Det e,skill_master i,tdm_proposal p,tdm_prj_mem_det m where e.Emp_Id=i.Emp_Id and i.Emp_Id=m.Emp_Id and p.Prj_Code=m.Prj_Code and e.Emp_Status <> 'R' order by m.Emp_Id,m.Start_Date Asc no it shows as: for example..... 101 |Sridevi |Senior Test Engineer |04-Apr-2003 |2.92 |2.66 |5.66| 1.25| 0.25| 7.16 |B.Sc.,MCA| 2001 |Available |India |Trade Finance - Polaris| Nil |Mumbai |01-Jun-2004 |31-Dec-2004 101 |Sridevi |Senior Test Engineer |04-Apr-2003 |2.92 |2.66 |5.66 |1.25| 0.25 |7.16| B.Sc.,MCA |2001 Available |India |Constact Contact Genesis |Nil |Bangalore |14-Feb-2005 |31-Aug-2005 BUt I nedd to display only 101 |Sridevi |Senior Test Engineer |04-Apr-2003 |2.92 |2.66 |5.66 |1.25| 0.25 |7.16| B.Sc.,MCA |2001 Available |India |Constact Contact Genesis |Nil |Bangalore |14-Feb-2005 |31-Aug-2005 because 14-Feb-2005 is greater.. tell me how to change my query Rgds, Shan.
  24. Hi All, I have 3 list boxes,The first list boxes contains the project names and the second list box contains module names and the third list box contains sub module names. All the project names,module names and its sub modules have there own separate master tables. what is expected is, if i click the project name only its respective module names shld be displayed and if i click the module name only its sub modules shld be displayed. i am able to do for 2 list boxes tht is if i select the project all its sub modules are displayed i want the same to be happend for sub modules too? i am using php with mysql the code which i used is as follows: Javascript function window_onload() { var qs=location.search.substring(1,location.search.length); var pair = qs.split('='); temp = unescape(pair[1]).split('+'); document.form1.prd_name.value=temp; } function Product_onblur() { var my_prd= ""; var index1=document.form1.prd_name.selectedIndex my_prd=document.form1.prd_name.options[index1].value window.location.href = unescape("log_defect.php"+"?prod_name="+my_prd); } php code: <select style="border-style:none; FONT-SIZE: 10pt; WIDTH: 137px; COLOR: #222222; " name="prd_name" style="font-size: 10pt" tabindex="2" onChange="return Product_onblur()"> <?php $query=mysql_query("SELECT prod_name name FROM dt_product order by prod_name ASC",$connection )or die ("cant do it"); while ($result=mysql_fetch_array($query)) { echo '<option value="' . $result['name'] . '">' . $result['name'] . '</option>'; } ?> </select> can anybody help me, Thanks in advance shan
  25. Hi all, i hav an error in my subquery SELECT * FROM HR_Emp_Det WHERE Emp_LName=(select Emp_LName FROM `HR_Emp_Det` WHERE Emp_Id='368') it shows me, You have an error in your SQL syntax near 'select Emp_LName FROM `HR_Emp_Det` WHERE Emp_Id='368') LIMIT 0, 30' at line 1 how to make it? am using mysql 3.23 Rgds, Shan
×
×
  • 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.