thanks guys, to do it in my self
finaly solve..
"SELECT MAX(sr_no) AS maxsr, request_to FROM (SELECT sr_generate.srno AS sr_no,sr_generate.sr_branch_code AS request_to FROM sr_generate UNION ALL SELECT smr_request_compile.sr_no, smr_request_compile.request_to FROM smr_request_compile) AS subTable WHERE request_to = '$branch_code'";
okay..
just i need is to identify the max number of field1 and field3. and don't mind where. hope it is clear. and, sorry if i cannot explain well, im not good enough in English. very sorry and i hope u can help me guys.
i need to union that table because i have two form with different views and i need to identify witch max id to add 1.
may result should be.. depend to a user login
result :
6 - - - -> FVCR
This line
$query = $this->db->query("UPDATE sr_list SET `sr_star` = '$check_one[$i]', `pr_star` = '$check_two[$i]', `comm_star` = '$comm[$i]' WHERE srid = '$selectedid[$i]'");
i dont use radio button since this is different field name.
This is my HTML
<input type="text" name="selectedid[]" value = "<?php echo $row['genid'];?>"/>
<input type="checkbox" name="check_one[]" value = "1"/> PR
<input type="checkbox" name="check_two[]" value = "2"/>
<input type="text" class="form-control input-sm" name = "comment[]" value = "Receive">
So now how do i avoid the error if the situation like image above. ?
Hi ginerjm.
yes i get an error with Undefined offset: 1 but when i check all checkbox i did not get any error and it work perfect. but in this scenario not everytime that i need to check all check-boxes. and maybe latter i put a validation with my checkbox and textbox when i get the correct logic.
Hi Codes,
i have two checkbox and one input-text with a multiple rows and i try to update but not work correctly. my main problem are the two checkbox it is optional and not necessary to add check to update record.
here my code
$selectedid = $this->input->post('selectedid');
$check_one = $this->input->post('check_one');
$check_two => $this->input->post('check_two');
$comm => $this->input->post('comment');
for($i = 0; $i < count($selectedid); $i++)
{
$query = $this->db->query("UPDATE sr_list SET `sr_star` = '$check_one[$i]', `pr_star` = '$check_two[$i]', `comm_star` = '$comm[$i]' WHERE srid = '$selectedid[$i]'");
}
Hi,
Thanks for all you responce, and i have new problem, i cant get current month and im using by the way, ODBC connection and using access 79 DB.
WHERE Date between '8/1/2015' and '8/30/2015'
but stil cant get all the date between.
Hi coders,
This is not my actual table, but this is what im looking to do in my data, to display horizontal like image below.
any body can help?
Thanks.
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.