API to connect and use MySQL database


void result_set_conv_date('result, function:1) Set the function that will convert a Date or DateTime string to the corresponding value. int result_get_length('result) Return the number of rows returned or affected int result_get_nfields('result) Return the number of fields in a result row object? result_next('result) Return the next row if available. A row is represented as an object, which fields have been converted to the corresponding Neko value (int, float or string). For Date and DateTime you can specify your own conversion function using result_set_conv_date. By default they're returned as plain strings. Additionally, the TINYINT(1) will be converted to either true or false if equal to 0. string result_get('result, n : int) Return the nth field of the current row int result_get_int('result, n : int) Return the nth field of the current row as an integer (or 0) float result_get_float('result, n : int) Return the nth field of the current row as a float (or 0)


void close('connection) Close the connection. Any subsequent operation will fail on it void select_db('connection, string) Select the database 'result request('connection, string) Execute an SQL request. Exception on error string escape('connection, string) Escape the string for inserting into a SQL request 'connection connect({ host => string, port => int, user => string, pass => string, socket => string?}) Connect to a database using the connection informations

© 2019 Haxe Foundation | Contribute to this page