Dears
please I need very urgent help do anyone can support?
I have two tables service and billing, and want to insert into some billing table column values selected from service table where service.entry_no = input number to form
<?php
$db = new_mysqli('"host","user", "pass", "db"); // I removed the origin info to post it here
$entry = mysql_real_escape_string($_post['entry']);
$entry_date = $db->query("select Entry_date from service where entry_no = $entry");
$costumer = $db->query("select costumer from service where entry_no = $entry");
$service_type = $db->query("select service_type from service where entry_no = $entry");
$expected = $db->query("select expected from service where entry_no = $entry");
$advanced = $db->query("select advanced from service where entry_no = $entry");
$technician_notes = $db->query("select technician_notes from service where entry_no = $entry");
while ($row = $result->fetch_object()) { $db->query("insert into billing entry_number, service_entry_date , costumer_name, service_type, rate, advanced, technician_notes
values ('{$entry_date}','{$costumer}','{$service_type}', '{$expected}','{$advanced}', '{$technician_notes}');
}
?>
Best
Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
Urgent support required
-
- Site Admin
- Posts: 2781
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 1 time
Re: Urgent support required
rawia_tsalih,
This seems to have nothing to do with nuBuilder.
Are you aware of the nuBuilder function nuRunQuery(). http://wiki.nubuilder.net/nubuilderv3/i ... alse.5D.29
Steven.
This seems to have nothing to do with nuBuilder.
Are you aware of the nuBuilder function nuRunQuery(). http://wiki.nubuilder.net/nubuilderv3/i ... alse.5D.29
Steven.
-
- Posts: 6
- Joined: Wed Mar 16, 2016 8:06 pm
Re: Urgent support required
Dear Admin
thanks a lot for your support please would you advise me where is the mistake I did what you recommended but still not retrieve data or do insert...
the php code is
$entry = mysql_real_escape_string($_post['entry']);
$query="INSERT INTO `hupayi_com`.`ra_Invoice` (`ra_inv_servcie_entry`, `ra_inv_service_type`, `ra_inv_customer`, `ra_inv_technician_note`, `ra_inv_expected`, ``ra_inv_advanced)
SELECT ``ra_services_entry, `ra_s_service_type`, `ra_s_customer`, `ra_s_technician_notes` , `ra_s_expected`, `ra_s_balanced`
FROM `hupayi_com`.`ra_services`
WHERE `ra_services_entry` LIKE `$entry`";
nuRunQuery($query);
and I snapshot the screens 1,2,3,4,and 6 the steps are attached please help me
thanks a lot for your support please would you advise me where is the mistake I did what you recommended but still not retrieve data or do insert...
the php code is
$entry = mysql_real_escape_string($_post['entry']);
$query="INSERT INTO `hupayi_com`.`ra_Invoice` (`ra_inv_servcie_entry`, `ra_inv_service_type`, `ra_inv_customer`, `ra_inv_technician_note`, `ra_inv_expected`, ``ra_inv_advanced)
SELECT ``ra_services_entry, `ra_s_service_type`, `ra_s_customer`, `ra_s_technician_notes` , `ra_s_expected`, `ra_s_balanced`
FROM `hupayi_com`.`ra_services`
WHERE `ra_services_entry` LIKE `$entry`";
nuRunQuery($query);
and I snapshot the screens 1,2,3,4,and 6 the steps are attached please help me
- Attachments
-
- 6.jpg (61.69 KiB) Viewed 3564 times
-
- 4.jpg (35.06 KiB) Viewed 3564 times
-
- 3.jpg (48.1 KiB) Viewed 3564 times
-
- 2.jpg (59.7 KiB) Viewed 3564 times
-
- 1.jpg (52.69 KiB) Viewed 3564 times
-
- Site Admin
- Posts: 2781
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 1 time
Re: Urgent support required
rawia_tsalih,
nuRunPHP(INFUNC) should be nuRunPHP('INFUNC')
That is all I can see is wrong.
Steven
nuRunPHP(INFUNC) should be nuRunPHP('INFUNC')
That is all I can see is wrong.
Steven