4
I’ve spent the last three hours trying to find the error... maybe it’s sleep, but I’ll put my very complicated script so someone can shed some light.
$query_passaporte = "SELECT num_compra, data_compra, plano, passaporte_paypal FROM paypal WHERE 'empid' = ' ".$_SESSION['empid']." ' AND 'show' ='1' ORDER BY num_compra ASC";
$dados_passaporte = mysqli_query($dbc, $query_passaporte) or die(mysqli_error($dbc));
while(list($num_compra, $data_compra, $plano, $passaporte_paypal) = mysqli_fetch_array($dados_passaporte)){
echo 'nao funciona'.$num_compra. $data_compra. $plano. $passaporte_paypal;}
print_r($dados_passaporte); ------> resulta em mysqli_result Object ()
ECHO does not return.
$dbc is OK. In the query, I use simple quotes in EMPID and SHOW not to give syntax error (do not know pq gives error, other scripts are without quotes)
It was the first code written after I formatted my windows and put UBUNTU (although I’m sure it has nothing to do).
I just don’t know what I’m missing...
Do not use single quotes
'
in value-only field names, if you have a special character name or reserve word, use the crase >>`<<– rray
Just for the record:
Object ()
is the expected output for$dados_passaporte
. Your data is actually inmysqli_fetch_array($dados_passaporte)
.– bfavaretto