mirror of
https://github.com/dyiop/astute.git
synced 2025-04-05 21:10: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>
|
||||||
<tr>
|
<tr>
|
||||||
<td><span class="input-group-text">SO Title</span></td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 20%"><span class="input-group-text">SO Number</span></td>
|
<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
|
-- Dumping structure for function astute.create_customer_fun
|
||||||
DELIMITER //
|
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
|
BEGIN
|
||||||
DECLARE last_inserted_id varchar(20);
|
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)
|
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, faxIn);
|
VALUES (customerid, customerName, billToDept, add1In, add2In, cityIn, stateIn, zipIn, ziplast4In, emailIn, phoneIn, extIn, faxIn);
|
||||||
SELECT LAST_INSERT_ID() into last_inserted_id;
|
SELECT LAST_INSERT_ID() into last_inserted_id;
|
||||||
return last_inserted_id;
|
return last_inserted_id;
|
||||||
END//
|
END;
|
||||||
DELIMITER ;
|
|
||||||
|
|
||||||
-- Dumping structure for procedure astute.create_invoice
|
-- Dumping structure for procedure astute.create_invoice
|
||||||
DELIMITER //
|
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');
|
('MDOT', 2, 'John John', 'Manager', '1231231233', 1233, '1232343455', '234123344', 'Test@Test.com', '123 Test Drive');
|
||||||
/*!40000 ALTER TABLE `customer_contact` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `customer_contact` ENABLE KEYS */;
|
||||||
|
|
||||||
-- Dumping structure for function astute.delete_custmer
|
-- Dumping structure for function astute.delete_customer
|
||||||
DELIMITER //
|
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
|
BEGIN
|
||||||
|
|
||||||
DECLARE po_count int;
|
DECLARE po_count int;
|
||||||
|
@ -202,15 +202,6 @@ BEGIN
|
||||||
END//
|
END//
|
||||||
DELIMITER ;
|
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
|
-- Dumping structure for function astute.delete_customer_contact
|
||||||
DELIMITER //
|
DELIMITER //
|
||||||
CREATE DEFINER=`root`@`localhost` FUNCTION `delete_customer_contact`(customer_id_in varchar(20), contact_id_in int) RETURNS varchar(20) CHARSET utf8
|
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";
|
host = "localhost";
|
||||||
port = 3306;
|
port = 3306;
|
||||||
schema = "astute";
|
schema = "astute";
|
||||||
username = "astute_user";
|
username = "root";
|
||||||
password = "password";
|
password = "password";
|
||||||
System.out.println("=============================================");
|
System.out.println("=============================================");
|
||||||
System.out.println("host is " + host);
|
System.out.println("host is " + host);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user