mirror of
https://github.com/dyiop/astute.git
synced 2025-04-05 13:00:16 -04:00
Fixed a DB function, renamed a stored proc
Fixed a typo
This commit is contained in:
parent
ae681d0a8d
commit
ce74ce45e2
|
@ -67,7 +67,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><span class="input-group-text">SO Title</span></td>
|
||||
<td colspan="3"><input type="text" class="form-control" placeholder="Distinctive title, will be use to identify later" #title></td>
|
||||
<td colspan="3"><input type="text" class="form-control" placeholder="Distinctive title, will be used to identify later" #title></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%"><span class="input-group-text">SO Number</span></td>
|
||||
|
|
|
@ -60,15 +60,15 @@ END;
|
|||
|
||||
-- Dumping structure for function astute.create_customer_fun
|
||||
DELIMITER //
|
||||
CREATE DEFINER=`root`@`localhost` FUNCTION `create_customer_fun`(customerid varchar(20), customerName varchar(100), billToDept varchar(100), add1In varchar(100), add2In varchar(100), cityIn varchar(50), stateIn varchar(20), zipIn int(5), zipLast4In int(4), emailIn varchar(50), phoneIn varchar(20), faxIn varchar(20)) RETURNS varchar(20) CHARSET utf8
|
||||
CREATE FUNCTION astute.`create_customer_fun`(customerid varchar(20), customerName varchar(100), billToDept varchar(100), add1In varchar(100), add2In varchar(100), cityIn varchar(50), stateIn varchar(20), zipIn int(5), zipLast4In int(4), emailIn varchar(50), phoneIn varchar(20), extIn int(6), faxIn varchar(20)) RETURNS varchar(20) CHARSET utf8
|
||||
BEGIN
|
||||
DECLARE last_inserted_id varchar(20);
|
||||
INSERT INTO customer (customer_id, customer_name, bill_to_dept, add1, add2, city, state ,zip, zip_last_4, email, phone, fax)
|
||||
VALUES (customerid, customerName, billToDept, add1In, add2In, cityIn, stateIn, zipIn, ziplast4In, emailIn, phoneIn, faxIn);
|
||||
INSERT INTO customer (customer_id, customer_name, bill_to_dept, add1, add2, city, state ,zip, zip_last_4, email, phone, phext, fax)
|
||||
VALUES (customerid, customerName, billToDept, add1In, add2In, cityIn, stateIn, zipIn, ziplast4In, emailIn, phoneIn, extIn, faxIn);
|
||||
SELECT LAST_INSERT_ID() into last_inserted_id;
|
||||
return last_inserted_id;
|
||||
END//
|
||||
DELIMITER ;
|
||||
END;
|
||||
|
||||
|
||||
-- Dumping structure for procedure astute.create_invoice
|
||||
DELIMITER //
|
||||
|
@ -179,9 +179,9 @@ INSERT INTO `customer_contact` (`customer_id`, `contact_id`, `name`, `title`, `w
|
|||
('MDOT', 2, 'John John', 'Manager', '1231231233', 1233, '1232343455', '234123344', 'Test@Test.com', '123 Test Drive');
|
||||
/*!40000 ALTER TABLE `customer_contact` ENABLE KEYS */;
|
||||
|
||||
-- Dumping structure for function astute.delete_custmer
|
||||
-- Dumping structure for function astute.delete_customer
|
||||
DELIMITER //
|
||||
CREATE DEFINER=`root`@`localhost` FUNCTION `delete_custmer`(customer_id_in varchar(20)) RETURNS varchar(40) CHARSET utf8
|
||||
CREATE DEFINER=`root`@`localhost` FUNCTION `delete_customer`(customer_id_in varchar(20)) RETURNS varchar(40) CHARSET utf8
|
||||
BEGIN
|
||||
|
||||
DECLARE po_count int;
|
||||
|
@ -202,15 +202,6 @@ BEGIN
|
|||
END//
|
||||
DELIMITER ;
|
||||
|
||||
-- Dumping structure for function astute.delete_custmer_contact
|
||||
DELIMITER //
|
||||
CREATE DEFINER=`root`@`localhost` FUNCTION `delete_custmer_contact`(customer_id_in varchar(20), customer_contact_id int) RETURNS varchar(40) CHARSET utf8
|
||||
BEGIN
|
||||
delete from customer_contact where customer_id = customer_id_in and contact_id = customer_contact_id;
|
||||
RETURN 'SUCCESS';
|
||||
END//
|
||||
DELIMITER ;
|
||||
|
||||
-- Dumping structure for function astute.delete_customer_contact
|
||||
DELIMITER //
|
||||
CREATE DEFINER=`root`@`localhost` FUNCTION `delete_customer_contact`(customer_id_in varchar(20), contact_id_in int) RETURNS varchar(20) CHARSET utf8
|
||||
|
|
|
@ -60,7 +60,7 @@ public abstract class DAO {
|
|||
host = "localhost";
|
||||
port = 3306;
|
||||
schema = "astute";
|
||||
username = "astute_user";
|
||||
username = "root";
|
||||
password = "password";
|
||||
System.out.println("=============================================");
|
||||
System.out.println("host is " + host);
|
||||
|
|
Loading…
Reference in New Issue
Block a user