tadapapaya Posted November 12, 2008 Share Posted November 12, 2008 the question: Distribution List This module is to generate the courier order distribution list for every day. Fields and Description 1. Distribution List Date · Mandatory field · Should not be blank · Should be a valid Date (including leap year) · DD-MM-YYYY format. Button and Description 1. Submit · All the validation mentioned above are to be done when this button is clicked (client side validations) · The values entered should be sent to the PHP · The PHP in turn should perform the validation to check the mandatory fields o Create a Stored procedure/function to generate to Distribution List that accepts the date on which the distribution list is to be generated. The stored procedure/function should fetch the orders from Sterling_order table that are placed on or before the given date and that has been accepted but not assigned to any employees. (EmployeeID will be null in this case) For each order, the stored procedure/function should identify the Delivery Boy who takes care of delivery in the region where the courier has to be dispatched. The stored procedure/function should assign the Employee by updating the EmployeeID of the corresponding courier order in the Sterling_order table. i. -1, if no new order is available for assigning, on or before the given date ii. -2, in case of failure iii. 0, in case of success Note: Assumption is, for all the regions there is at least and at the most one delivery boy. o Retrieve the list of OrderID which are assigned to the given employeeId but not close (i.e. courierStatus other than ‘R’, ‘D’) · On Success as well on failure, display appropriate message. 2. Reset · All the fields should be reset to the default, if any. at the submit button,i don't understand...below the coding i wrote...got dizzy now.. the coding : <html> <head> <title>Distribution List</title> <link rel="stylesheet" type="text/css" href="xxx.css" /> </head> <body> <script type='text/javascript'> function check(){ var day = document.getElementById('day'); var month = document.getElementById('month'); var year = document.getElementById('year'); if(DAY(day, "Select Day...")){ if(MONTH(month, "Select Month...")){ if(YEAR(year, "Select Year...")){ return true; } } } return false; } function DAY(elem, Msg){ if(elem.value == "DAY"){ alert(Msg); elem.focus(); return false; }else{ return true; } } function MONTH(elem, Msg){ if(elem.value == "MONTH"){ alert(Msg); elem.focus(); return false; }else{ return true; } } function YEAR(elem, Msg){ if(elem.value == "YEAR"){ alert(Msg); elem.focus(); return false; }else{ return true; } } </script> <center><h1>Distribution List Generation</h1> <form name= "distribution_form" method= "post" action= "DistributionListGenerator.php" onsubmit='return check()'> Date Of Distribution : <select id="day"> <option> DAY </option> <option> 1 </option> <option> 2 </option> <option> 3 </option> <option> 4 </option> <option> 5 </option> <option> 6 </option> <option> 7 </option> <option> 8 </option> <option> 9 </option> <option> 10 </option> <option> 11 </option> <option> 12 </option> <option> 13 </option> <option> 14 </option> <option> 15 </option> <option> 16 </option> <option> 17 </option> <option> 18 </option> <option> 19 </option> <option> 20 </option> <option> 21 </option> <option> 22 </option> <option> 23 </option> <option> 24 </option> <option> 25 </option> <option> 26 </option> <option> 27 </option> <option> 28 </option> <option> 29 </option> <option> 30 </option> <option> 31 </option></select> <select id="month"> <option> MONTH </option> <option> 1 </option> <option> 2 </option> <option> 3 </option> <option> 4 </option> <option> 5 </option> <option> 6 </option> <option> 7 </option> <option> 8 </option> <option> 9 </option> <option> 10 </option> <option> 11 </option> <option> 12 </option></select> <select id="year"> <option> YEAR </option> <option> 2010 </option> <option> 2009 </option> <option> 2008 </option> <option> 2007 </option> <option> 2006 </option> <option> 2005 </option> <option> 2004 </option> <option> 2003 </option> <option> 2002 </option> <option> 2001 </option> <option> 2000 </option> <option> 1999 </option> <option> 1998 </option> <option> 1997 </option> <option> 1996 </option> <option> 1995 </option></select> <br><br><input type= "submit" value= "Submit" name="sub"> <input type= "reset" value= "Reset" name= "res"> </form></center> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/132424-urgent-help-me/ Share on other sites More sharing options...
trq Posted November 12, 2008 Share Posted November 12, 2008 Sounds like homework to me. Where exactly are you stuck? Quote Link to comment https://forums.phpfreaks.com/topic/132424-urgent-help-me/#findComment-688466 Share on other sites More sharing options...
tadapapaya Posted November 12, 2008 Author Share Posted November 12, 2008 stuck at the submit button... when clicked,it goes to the DistributionListGenerator.php file... Quote Link to comment https://forums.phpfreaks.com/topic/132424-urgent-help-me/#findComment-688470 Share on other sites More sharing options...
trq Posted November 12, 2008 Share Posted November 12, 2008 stuck at the submit button... when clicked,it goes to the DistributionListGenerator.php file... Yeah, funny that. Thats what your action is set to. What is in your DistributionListGenerator.php file? Quote Link to comment https://forums.phpfreaks.com/topic/132424-urgent-help-me/#findComment-688473 Share on other sites More sharing options...
tadapapaya Posted November 12, 2008 Author Share Posted November 12, 2008 that i dont understand... it says to Create a Stored procedure/function... i dont know how... Quote Link to comment https://forums.phpfreaks.com/topic/132424-urgent-help-me/#findComment-688479 Share on other sites More sharing options...
trq Posted November 12, 2008 Share Posted November 12, 2008 Were not going to do your homework for you. I suggest you admit to your teacher that you havent been listening and ask for help. Quote Link to comment https://forums.phpfreaks.com/topic/132424-urgent-help-me/#findComment-688482 Share on other sites More sharing options...
tadapapaya Posted November 12, 2008 Author Share Posted November 12, 2008 i'm asked her already...she said to search into the web... thats what im doing now... Quote Link to comment https://forums.phpfreaks.com/topic/132424-urgent-help-me/#findComment-688483 Share on other sites More sharing options...
trq Posted November 12, 2008 Share Posted November 12, 2008 i'm asked him already...she said to search into the web... thats what im doing now... Simply posting your question on a forum is not searching. Go to http://mysql.org, find the documentaion and search that for stored procedures if that is where you are stuck. Quote Link to comment https://forums.phpfreaks.com/topic/132424-urgent-help-me/#findComment-688484 Share on other sites More sharing options...
tadapapaya Posted November 12, 2008 Author Share Posted November 12, 2008 seriously....i already search... but i dont understand... im still studying... not an expert... there a lot of world to explore... Quote Link to comment https://forums.phpfreaks.com/topic/132424-urgent-help-me/#findComment-688488 Share on other sites More sharing options...
premiso Posted November 12, 2008 Share Posted November 12, 2008 I think mainly what Thorpe is getting at is you do not seem to even be trying. Where is your PHP code? Where is the start of the stored procedure code you have attempted? You only posted the simple HTML page, and anyone can easily create that in a matter of a minute. Try actually writing the code and when you get stuck you might get some help. Quote Link to comment https://forums.phpfreaks.com/topic/132424-urgent-help-me/#findComment-688490 Share on other sites More sharing options...
tadapapaya Posted November 12, 2008 Author Share Posted November 12, 2008 okay2... i got it... Quote Link to comment https://forums.phpfreaks.com/topic/132424-urgent-help-me/#findComment-688511 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.