Page 1 of 1

Urgent support required

Posted: Thu Mar 24, 2016 11:07 am
by rawia_tsalih
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

Re: Urgent support required

Posted: Wed Mar 30, 2016 11:52 pm
by admin
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.

Re: Urgent support required

Posted: Thu Mar 31, 2016 3:17 pm
by rawia_tsalih
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

Re: Urgent support required

Posted: Fri Apr 15, 2016 1:39 am
by admin
rawia_tsalih,

nuRunPHP(INFUNC) should be nuRunPHP('INFUNC')

That is all I can see is wrong.

Steven