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