TAILIEUCHUNG - Học php, mysql và javascript - p 49

Chức năng MySQL Bởi có chức năng xây dựng vào MySQL, tốc độ thực hiện các truy vấn phức tạp là giảm đáng kể, như là sự phức tạp của họ. Nếu bạn muốn tìm hiểu thêm về các chức năng có sẵn, bạn có thể truy cập vào URL sau đây: | APPENDIX D MySQL Functions By having functions built into MySQL the speed of performing complex queries is substantially reduced as is their complexity. If you wish to learn more about the available functions you can visit the following URLs String functions http doc refman en Date and time http doe refman en date-and-time-funetions .html But for easy reference here are some of the most commonly used MySQL functions. String Functions CONCAT CONCAT str1 str2 . Returns the result of concatenating strl str2 and any other parameters or NULL if any argument is NULL . If any of the arguments are binary then the result is a binary string otherwise the result is a nonbinary string. The code returns the string MySQL SELECT CONCAT My S QL CONCAT_WS CONCAT_WS seporfltor strl str2 . This works in the same way as CONCAT except it inserts a separator between the items being concatenated. If the separator is NULL the result will be NULL but NULL values can be used as other arguments which will then be skipped. This code returns the string Truman Harry S SELECT CONCAT_WS Truman Harry S 461 LEFT LEFT str len Returns the leftmost len characters from the string str or NULL if any argument is NULL . The following code returns the string Chris SELECT LEFT Christopher Columbus 5 RIGHT RIGHT str len Returns the rightmost len characters from the string str or NULL if any argument is NULL . This code returns the string Columbus SELECT RIGHT Christopher Columbus 8 MID MID str pos len Returns up to len characters from the string str starting at position pos. If len is omitted then all characters up to the end of the string are returned. You may use a negative value for pos in which case it represents the character pos places from the end of the string. The first position in the string is 1. This code returns the string stop SELECT MID Christopher Columbus 6 4 LENGTH LENGTH str Returns the length in bytes of the string str. Note that .

Đã 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.