Changes for page 01 Lua Functions

Last modified by Theodore Xu on 2023/10/26 10:51

From version 5.32
edited by Stone Wu
on 2022/07/12 10:47
Change comment: There is no comment for this version
To version 5.35
edited by Stone Wu
on 2022/07/12 11:00
Change comment: (Autosaved)

Summary

Details

Page properties
Content
... ... @@ -1839,6 +1839,8 @@
1839 1839  == **normal_getdata_byname(string name)** ==
1840 1840  
1841 1841  
1842 +
1843 +
1842 1842  **Function:** Read the data of the monitoring point name
1843 1843  
1844 1844  **Parameter:**
... ... @@ -1853,4 +1853,55 @@
1853 1853  
1854 1854  = **11 MySQL database operation** =
1855 1855  
1856 -
1858 +== **luaMySql.init(string sourcename, string username, string password, string host, number port, string character)** ==
1859 +
1860 +**Function:** Configure database connection parameters
1861 +
1862 +**Parameter:**
1863 +
1864 +sourcename: the name of database
1865 +
1866 +username: the username of the connection
1867 +
1868 +password: the password of the connection
1869 +
1870 +host: the host name of the connection
1871 +
1872 +port: the host port of the connection
1873 +
1874 +character: the character set of the connection
1875 +
1876 +**Return:**
1877 +
1878 +Succeed: string
1879 +
1880 +Failed: multi
1881 +
1882 +== **luaMySql.exec(string statement)** ==
1883 +
1884 +**Function:** Execute the given SQL statement without returning the result set (add, delete, change)
1885 +
1886 +**Parameter:**
1887 +
1888 +statement: the given SQL statement
1889 +
1890 +**Return:**
1891 +
1892 +Succeed: status: returns the number of rows affected by SQL statement execution.
1893 +
1894 +Failed: mil, errorString
1895 +
1896 +== **luaMySql.execWithResult(string statement)** ==
1897 +
1898 +
1899 +**Function:** Execute the given SQL statement returning the result set (che)
1900 +
1901 +**Parameter:**
1902 +
1903 +statement: the given SQL statement
1904 +
1905 +**Return:**
1906 +
1907 +Succeed: status: returns the number of rows affected by SQL statement execution.
1908 +
1909 +Failed: mil, errorString