Jump to content

sknagesh

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sknagesh's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi I Have two tables CREATE TABLE InProcess ( InProcess_ID int(10) unsigned NOT NULL, Operation_ID int(10) unsigned NOT NULL, Basic_Dimn varchar(15) NOT NULL, PRIMARY KEY (InProcess_ID) ); CREATE TABLE InprocessDimns ( InProcessDimn_ID int(10) unsigned NOT NULL, IP_ID int(10) unsigned NOT NULL, Operation_ID int(10) unsigned NOT NULL, Batch_ID int(10) unsigned NOT NULL, Job_NO varchar(20) NOT NULL, Dimn_Measured varchar(20) NOT NULL, PRIMARY KEY (InProcessDimn_ID) ); Sample Data for InProcess Table InProcess_ID Operation_ID Basic_Dimn 1 10 25.5 2 10 32.0 3 10 1 4 10 2.5 5 10 5.0 6 10 5.0 7 10 22.0 8 10 13.1 9 10 12.2 10 10 2.0 Sample Data for InprocessDimns InProcessDimn_ID IP_ID Operation_ID Batch_ID Job_NO Dimn_Measured 1 5, 10, 11, 35, 5.02 2 7, 10, 11, 35, 21.98 3 10, 10, 11, 35, 2.0 As shown above Table InProcess has some 10 rows of data for Operation_ID='10' and Table InprocessDimns has 3 rows of data linked to Operation_ID of 10. What I want to do is show all data of Operation_ID(10) along with corresponding data from InprocessDimns. Here is the SQL I wrote. SELECT ip.* FROM InProcess AS ip LEFT OUTER JOIN InprocessDimns AS ipd ON ip.InProcess_ID=ipd.IP_ID WHERE ip.Operation_Id='10' AND Job_NO='35'. But this is giving me only 3 rows of data where InProcess_ID and IP_ID match. But I want all 10 rows from InProcess along with data from 3 rows in InprocessDimns. Any help is appreciated. Regards SKN
  2. Hi Here is the code. $('#add').click(function(){ var drawingid=$('#Drawing').val(); var incommingid=$('#Challan_ID').val(); var qty=$('#qty').val(); var Max_Qty=0; var url='get_challan_qty.php?drawingid='+drawingid+'&incommingid='+incommingid+'&qty='+qty; $.get(url, function(result) { Max_Qty=result; console.log(Max_Qty); }); console.log(Max_Qty); if(drawingid==''||incommingid==''||qty=='') { alert("Please select Corect Drawing, Challan No and Quantity"); return false; }else if (Max_Qty<qty) { alert("Please enter correct Quantity"); } elae { var url='get_comp_challan_details.php?drawingid='+drawingid+'&incommingid='+incommingid+'&qty='+qty; $.get(url, function(result) { data[noofcomp]=result.split("<|>") var newtr="<tr><td>"+data[noofcomp][0]+"</td><td>"+data[noofcomp][1]+"</td><td>"+data[noofcomp][2]+"</td><td>"+data[noofcomp][3]+"</td><td>"+data[noofcomp][4]+"</td><td>"+data[noofcomp][5]+"</td><td>"+data[noofcomp][6]+"</td><td>"+data[noofcomp][7]+"</td></tr>"; $('#added').show(); $('#added').append(newtr); $('#data').val(data); $('#noofcomp').val(noofcomp); noofcomp++; }); } Max_Qty inside the .get() function prints the expected value. But once it is outside the function its value is 0. Why is this?. TIA SKN
  3. Hi I am loading contents from my Mysql table for editing using PHP and Ajax. The data is loaded on into to the page dynamically using Ajax. Each cell in a column is having unique name and id like tollower[1], tollower[2], tollower[3] etc in one column. Next column is having tolupper[1],tolupper[2],tolupper[3] etc. I am able to update the edited values back in the Mysql table by using serializeArry() and posting the values. The problem i am having is in client side validation of the edit. I want to do some live validation of values entered for tollower[1] in first column to tolupper[1] in second column etc. How do I do this using Jquery validationEngine. Below is the HTML table as created by PHP. <input name="baloonno[0]" id="baloonno[0]" value="34.1" class="validate[required,custom[float]] text-input" type="text"> </td><td> <input name="basicdimn[0]" id="basicdimn[0]" value="22" class="validate[required,custom[float]] text-input" type="text"> </td><td> <input name="tollower[0]" id="tollower[0]" value="0.0000000000" type="text"> </td><td> <input name="tolupper[0]" id="tolupper[0]" value="1.0000000000" type="text"> </td><td> <select name="Instrument_ID[0]" id="Instrument_ID[0]"> <option value="1" selected="Selected">"DEW-1-Digital Vernier</option><option value="2">"DEW-2-0-25mm Micrometer</option><option value="3">"DEW-50-Pin Gage Set</option> </select></td><td> <input name="textfield[0]" id="textfield[0]" value="1" checked="checked" type="radio"> Yes <input name="textfield[0]" id="textfield[0]" value="0" type="radio"> No</td><td> <input name="proddimn[0]" id="proddimn[0]" value="1" checked="checked" type="radio"> Yes <input name="proddimn[0]" id="proddimn[0]" value="0" type="radio"> No</td><td> <input name="deldimn[0]" id="deldimn[0]" value="1" type="checkbox"> </td> </tr> <input name="InProcess_ID[0]" id="InProces_ID[0]" value="195" type="hidden"> <tr> <td> <input name="baloonno[1]" id="baloonno[1]" value="222" class="validate[required,custom[float]] text-input" type="text"> </td><td> <input name="basicdimn[1]" id="basicdimn[1]" value="94.5" class="validate[required,custom[float]] text-input" type="text"> </td><td> <input name="tollower[1]" id="tollower[1]" value="-0.1500000060" type="text"> </td><td> <input name="tolupper[1]" id="tolupper[1]" value="0.1700000018" type="text"> </td><td> <select name="Instrument_ID[1]" id="Instrument_ID[1]"> <option value="1" selected="Selected">"DEW-1-Digital Vernier</option><option value="2">"DEW-2-0-25mm Micrometer</option><option value="3">"DEW-50-Pin Gage Set</option> </select></td><td> <input name="textfield[1]" id="textfield[1]" value="1" checked="checked" type="radio"> Yes <input name="textfield[1]" id="textfield[1]" value="0" type="radio"> No</td><td> <input name="proddimn[1]" id="proddimn[1]" value="1" checked="checked" type="radio"> Yes <input name="proddimn[1]" id="proddimn[1]" value="0" type="radio"> No</td><td> <input name="deldimn[1]" id="deldimn[1]" value="1" type="checkbox"> </td> </tr> <input name="InProcess_ID[1]" id="InProces_ID[1]" value="194" type="hidden"> <tr> <td> <input name="baloonno[2]" id="baloonno[2]" value="22" class="validate[required,custom[float]] text-input" type="text"> </td><td> <input name="basicdimn[2]" id="basicdimn[2]" value="10.5" class="validate[required,custom[float]] text-input" type="text"> </td><td> <input name="tollower[2]" id="tollower[2]" value="0.0000000000" type="text"> </td><td> <input name="tolupper[2]" id="tolupper[2]" value="0.1500000060" type="text"> </td><td> <select name="Instrument_ID[2]" id="Instrument_ID[2]"> <option value="1" selected="Selected">"DEW-1-Digital Vernier</option><option value="2">"DEW-2-0-25mm Micrometer</option><option value="3">"DEW-50-Pin Gage Set</option> </select></td><td> <input name="textfield[2]" id="textfield[2]" value="1" checked="checked" type="radio"> Yes <input name="textfield[2]" id="textfield[2]" value="0" type="radio"> No</td><td> <input name="proddimn[2]" id="proddimn[2]" value="1" checked="checked" type="radio"> Yes <input name="proddimn[2]" id="proddimn[2]" value="0" type="radio"> No</td><td> <input name="deldimn[2]" id="deldimn[2]" value="1" type="checkbox"> </td> </tr> <input name="InProcess_ID[2]" id="InProces_ID[2]" value="193" type="hidden">
  4. Hi all I am populating a List menu with values from Mysql table. The values are populated correctly. Once a selection is made and upon submit when I display POST submit values using print_r($_POST) the result is correct only when the value do not contain spaces. For example if the list selection is "One" the $_POST[sel] value is correct. But if the selection is "Two Three" it is only first part before space. How do I get it to give complete value as in the list. Thanks and Regards SKN
  5. Hi All, I am new to PHP and HTML and I am trying to write an interface to MySQL 5.1 data base on Ubuntu 10.04LTS using PHP. My database has following tables 1) parts---> Part_no, Part_name--->PK is Part_no 2) operation---> Part_no,op_id--->PK is op_id, FK is Part_no 3)tool_list---->tl_id,op_id, tool---->PK is tl_id, FK is op_id 4)tool---->tool_part_no, tool_desc---->PK is tool_part_no I have many rows of data in 'tool' table. I want to referance/add these tools in to 'tool_list' table. these 'tool_list's are specific to a operatiom which once again is specific to a part. So Part_no--->op_id--->tool_list---->tool I have created 'one.php' which will aske the user for part no. This is a list which is populated from database. once the user selects the part_no and submits. it loads 'two.php' and lists operations specific to that part_no. Here once operation is selected and submited it calls 'three.php'. Here I need to add tools on to this selected operation. There can be as many as 20 different tool that can be added in to an operation. What i am looking to do is to list all tool in the 'tool' table as a list and add each tool in to the 'tool_list' table. once all tools are added press another button caled Exit which will take the user to Home page. The question is how do i accomplish this. 1) once a tool is selected it has to be added as a new row in to tool_list and the page need to be reloaded but has to remember the part_no, op_id for subsequent additions. 2) once all tools are added and exit is pressed it needs to goto home page. How do i accomplish these. Can a HTML page have two forms in it like on inside the other?. Or can this be accomplished with PHP only?. Thanks SKN
×
×
  • 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.