![]() |
MySQL 0.2 - Printable Version +- Gothic Online Forums (https://archive.gothic-online.com) +-- Forum: Scripting (English) (https://archive.gothic-online.com/forum-11.html) +--- Forum: Resources (https://archive.gothic-online.com/forum-14.html) +---- Forum: Modules (https://archive.gothic-online.com/forum-32.html) +---- Thread: MySQL 0.2 (/thread-25.html) |
MySQL 0.2 - Bimbol - 09.10.2015 MySQL bind is a third-party module, which provides Squirrel functions to access data from MySQL databases. More information about MySQL database you will find on the internet. If you looking for SQL language tutorial look here: http://www.w3schools.com/sql/ Implementation: Add mysql to config as script. Code: <module src="MySQL.dll" type="server" /> // For windows Squirrel function: [return value = function(params)] null/userpointer handler = mysql_connect(string host, string user, string password, string database, int port = 3306) mysql_close(userpointer handler) null/userpointer result = mysql_query(userpointer handler, string query) null/int rowCount = mysql_num_rows(userpointer result) null/int fieldCount = mysql_num_fields(userpointer result) null/array data = mysql_fetch_row(userpointer result) null/table data = mysql_fetch_assoc(userpointer result) bool ping = mysql_ping(userpointer handler) mysql_free_result(userpointer result) null/string error = mysql_error(userpointer handler) null/int errorId = mysql_errno(userpointer handler) Short example: Squirrel Script
Download version 0.2: Binares: https://bitbucket.org/Bimbol/sqmysql/downloads Source code: https://bitbucket.org/Bimbol/sqmysql/src RE: MySQL 0.1 - Bimbol - 31.08.2016 MySQL module was updated, and now work on version 0.0.3 ![]() RE: MySQL 0.1 - Bimbol - 29.10.2016 MySQL module update to 0.2! Changes: - Fixed crashes when row has NULL value - Added controling parameter types RE: MySQL 0.2 - Profesores - 07.10.2019 Hi, I've been created 0.3 version last year, and now I would like to share it with you ![]() Changelog: -[EDITED] mysql_query - now return true, when query was successful, or false when there's errors. -[ADDED] string(or false when there's problem) mysql_real_escape_string(handler, string to escape) - I don't think I need to expalin it ![]() Binares (windows/linux): https://mega.nz/#!qLhgmQSI!2ZnVY8_VVhxaNQJUdVwYj0Um3i55dd8ygkTwZ_ErYnM Source-Code: https://mega.nz/#!TH5mHIpT!exXcTYtV3gXXZJQXEBv710UNP8HQssU28IKn_J1U530 |