buongiorno Ragazzi, torno sull'argomento perche non riesco a risolvere il problema,
sto utilizzando uno script php presolevato in giro che allego,
e una funzioncina semplice che allego,
riesco a fare ( fino ad esso) le selezioni select * from ecc.  gli insert , e gli update,
sembra che tutto funzioni, ma quanto ho voluto provare un 
select count(*) from user, non mi ritorna nulla,
qualcuno potrebbe farmi capire dove sbaglio e correggere eventuale file php oppure funzione b4x?
Grazie mille
richiamo la funzione cosi
	
	
	
	
	
	
	
	
	
		' questa funziona'
Dim query As String = $"Select * from DgUtenti where id_accesso='${txtUsername.Text}' and password = '${txtPassword.Text}' limit 1;"$
        Wait For (php_fqgr.ExecuteRemoteQuery(query,metodo)) Complete (Valore As String)
        Log("valore " & metodo &": " & Valore)
	 
	
	
		
	
 
	
	
	
	
	
	
	
	
	
		' questa non fa nulla
metodo="Cerca"
    Dim query As String = $"Select COUNT(*) from DgUtenti"$
    Wait For (php_fqgr.ExecuteRemoteQuery2(query,metodo)) Complete (Valore As String)
    Log("valore " & metodo &": " & Valore)
	 
	
	
		
	
 
File Php
	
	
	
	
	
	
	
	
	
		<?php
$databasehost = "localhost";
$databasename = "";
$databaseusername ="";
$databasepassword = "";
error_reporting(E_ALL ^ E_WARNING);
error_reporting(0);
$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);
?>
	 
	
	
		
	
 
Funzione B4x
	
	
	
	
	
	
	
	
	
		Sub ExecuteRemoteQuery(Query As String, JobName As String) As ResumableSub
    Dim res As String
    Dim job As HttpJob
    Log(Query)
    job.Initialize(JobName, Me)
    job.PostString("http://127.0.01/file.php", Query)
    Wait For (job) JobDone(job As HttpJob)
    
    Log("successo?")
    Log(job.Success)
    
    If job.Success Then
        res = job.GetString
        If JobName="Insert" Then res="OK"
        If JobName="Delete" Then res="OK"
        If JobName="Update" Then res="OK"
        If JobName="Cerca" And  res.Length < 5 Then res="0"
'        Return res
    Else
        res = "KO"
    End If
    
    job.Release
    Return res
    
End Sub