php - multi insert in condition into 1 table -
There is a trx_log table that records any activity I / O
to create a form of activity, 3 There are input but the situation is not always complete, sometimes only 1 input is executed. Sometimes, only 1 input results in two, so it should only be entered in the trx_log table. but it's not like that. All inputs are entered in trx_log table while only 1 input is filled and others are not.
I just need an input that can be completed.
if ($ id_kons1> 0) {mysql_query ("enter in trx_kons values" ('', '". $ _ Requests [id_kons1']. '', '$ Trx_dateout' , '', $ Jumlah1 ',' ',' ',' ',' 1 ',' '))}}' '$ Trx_dateout' ',' ',' $ jumlah2 ',' ',' '' ',' ',' 1 ',' ') "); }, '$ Trx_dateout', '', '$ jumlah3', '', '' '', '', '1', '') "};} Help, get stuck
You are not clear the question; / I believe that on the form Based on what the input is filled, if you want to put it to three rows, then if you want to separate to tell them <3 ($ Id_kons1> 0) {mysql_query ("trx_kons enter values" ("," . $ _ Request ['id_kons1']. '', '$ Trx_dateout', '', '$ jumlah1', '', '', '', '1', '') "); } "$ Trx_dateout", "$ trx_dateout", "',' $ jumlah2 ',' ',' ($ id_kons2 & gt;) {mysql_query (" trx_kons values "('', ''. $ _ [Request 'id_kons2 '].', '', '1', '') "); } "$ Trx_dateout", "$ trx_dateout", "',' $ jumlah3 ',' ',' ', $' '', '', '1', '')); }
Comments
Post a Comment