Greetings as I could improve the server's unstable responses, the problem is that it does not give me security and in some cases gives the answer and in others only an error ... the information is present for the different queries. I have updated the database.
B4X:
Response from server: [{"ID":"1175","NOMBRE":"CLAVO CORRIENTE CON CABEZA 2-1\/2 PULG (GRANEL)","CODIGO":"1137","REFERENCIA":"1174","PRECIO":"797,9","FECHA":"21-2-18","EMPAQUE":"KILOGRAMO","FOTO":"https:\/\/www.M.com\/Content\/Thumbnails\/01137.png","FOTO1":""}
B4X:
ResponseError. Reason: Internal Server Error, Response: <h1 style='color:#497A97;font-size:12pt;font-weight:bold'>500 - Internal Server Error
B4X:
Servidor: mysql via TCP/IP
Tipo de servidor: MySQL
Versión del servidor: 5.1.55 - Source distribution
Versión del protocolo: 10
Usuario: xxxxxxx@localhost
Conjunto de caracteres del servidor: UTF-8 Unicode (utf8)
Servidor web
Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.6b mod_fastcgi/2.4.2
Versión del cliente de base de datos: libmysql - 5.1.55
extensión PHP: mysql Documentación
phpMyAdmin
Acerca de esta versión: 4.0.10.16
B4X:
job.PostString("http://accccccc.com/"&BASE, Query)
B4X:
<?php
$databasehost = "localhost";
$databasename = "xxxx";
$databaseusername ="xxxx";
$databasepassword = "xxxx";
$con = mysqli_connect($databasehost,$databaseusername,$databasepassword, $databasename) or die(mysqli_error($con));
mysqli_set_charset ($con , "utf8");
$query = file_get_contents("php://input");
$sth = mysqli_query($con, $query);
if (mysqli_errno($con)) {
header("HTTP/1.1 500 Internal Server Error");
echo $query.'\n';
echo mysqli_error($con);
}
else
{
$rows = array();
while($r = mysqli_fetch_assoc($sth)) {
$rows[] = $r;
}
$res = json_encode($rows);
echo $res;
mysqli_free_result($sth);
}
mysqli_close($con);
?>