Hi !
New library ! MysqlConn. It is fully written in B4X !
This library is compatible with B4J & B4A. It depends on OkHttpUtils2 and a PHP Script.
PHP Script :
Functions :
Events :
GetBlob is not supported for now... I'm currently working on it.
I'm attaching the project for B4J & B4A And The source code too.
I don't know if it is compatible with B4I.
IMPORTANT : This library is BETA, it seems sometimes, you will find some bugs, if you find one, please report it and start a new thread for your question ! Thank you for your help.
Hope you will enjoy it !
New library ! MysqlConn. It is fully written in B4X !
This library is compatible with B4J & B4A. It depends on OkHttpUtils2 and a PHP Script.
PHP Script :
PHP Script:
<?php
$host_name = $_GET['Hostname'];
$database = $_GET['DbName'];
$user_name = $_GET['username'];
$password = $_GET['password'];
$link = mysqli_connect($host_name, $user_name, $password, $database);
if ($_GET['Type'] == 'Test') {
if ($link->connect_error) {
die(0);
} else {
echo 1;
}
} elseif ($_GET['Type'] == 'QueryNoResults') {
$query = $link->query($_GET['Query']);
if ($query) {
echo '1';
} else {
echo '0';
}
} elseif ($_GET['Type'] == 'QueryResults') {
$query = mysqli_query($link, $_GET['Query']);
$rows = array();
while($r = mysqli_fetch_assoc($query)) {
$rows[] = $r;
}
$res = json_encode($rows);
echo $res;
mysqli_free_result($query);
}
?>
Functions :
- Initialize
- QueryNoResults
- QueryResults
- MysqlResultSet
- GetString
- GetDouble
- GetInt
Events :
- EventName_QueryResultsDone(Result As List)
- EventName_QueryNoResultsDone(Result As Boolean)
GetBlob is not supported for now... I'm currently working on it.
I'm attaching the project for B4J & B4A And The source code too.
I don't know if it is compatible with B4I.
IMPORTANT : This library is BETA, it seems sometimes, you will find some bugs, if you find one, please report it and start a new thread for your question ! Thank you for your help.
Hope you will enjoy it !