Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
Beginning PHP and MySQL From Novice to Professional phần 9
Đang chuẩn bị liên kết để tải về tài liệu:
Beginning PHP and MySQL From Novice to Professional phần 9
Thành Ân
92
108
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Bạn có thể tự hỏi về tuyên bố dấu phân cách, mặc dù. Theo mặc định, MySQL sử dụng dấu chấm phẩy để xác định khi nào một tuyên bố đã kết luận. Tuy nhiên, khi tạo ra một thói quen multistatement được lưu trữ, bạn cần để viết báo cáo nhiều, vào được gửi từ một hình thức Web. Bạn cũng có thể sử dụng thư viện | 830 CHAPTER 32 STORED ROUTINES You may be wondering about the DELIMITER statement though. By default MySQL uses the semicolon to determine when a statement has concluded. However when creating a multistatement stored routine you need to write several statements but you don t want MySQL to do anything until you ve finished writing the stored routine. Therefore you must change the delimiter to another character string. It doesn t have to be . You can choose whatever you please or AA for instance. Executing a Stored Routine Executing a stored routine is accomplished by referencing the stored routine in conjunction with the CALL statement. For example executing the previously created get_inventory procedure is accomplished like so mysql CALL get_inventory @inv mysql SELECT @inv Executing get_inventory will return ------------- @inv ------------- 45 ------------- Creating and Using Multistatement Stored Routines Single-statement stored routines are quite useful but stored routines real power lies in their ability to encapsulate and execute several statements. In fact an entire language is at your disposal enabling you to perform rather complex tasks such as conditional evaluation and iteration. For instance suppose your company s revenues are driven by a sales staff. To coax the staff into meeting its lofty goals bonuses are tacked onto their monthly paychecks with the size of the bonus proportional to the revenues attributed to the employee. The company handles its payroll internally using a custom Java program to calculate and print the bonus checks at the conclusion of each year CHAPTER 32 STORED ROUTINES 831 however a Web-based interface is provided to the sales staff so that it can monitor its progress and bonus size in real time. Because both applications would require the ability to calculate the bonus amount this task seems like an ideal candidate for a stored function. The syntax for creating this stored function looks like this DELIMITER CREATE FUNCTION .
TÀI LIỆU LIÊN QUAN
Beginning PHP and MySQL E-Commerce From Novice to Professional phần 1
Beginning PHP and MySQL E-Commerce From Novice to Professional phần 2
Beginning PHP and MySQL E-Commerce From Novice to Professional phần 3
Beginning PHP and MySQL E-Commerce From Novice to Professional phần 4
Beginning PHP and MySQL E-Commerce From Novice to Professional phần 5
Beginning PHP and MySQL E-Commerce From Novice to Professional phần 6
Beginning PHP and MySQL E-Commerce From Novice to Professional phần 7
Beginning PHP and MySQL E-Commerce From Novice to Professional phần 8
Beginning PHP and MySQL E-Commerce From Novice to Professional phần 9
Beginning PHP and MySQL E-Commerce From Novice to Professional phần 10
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.