1
In this select the bottom how can I make it only return the lines with the ids that are in this variable ( $range ) this variable is returning data from several ids database
// estou utlizando a função unserialize
$range = unserialize ($linha["range_ids"]);
$sql = "SELECT a.*, f.*,e.*,u.*,p.*, SUM(valor) AS 'soma' FROM a_finan AS f
LEFT JOIN agenda_saidas AS a
ON a.id_saida = f.id_saida
LEFT JOIN empresas AS e
ON e.id_empresa = f.id_empresa
LEFT JOIN usuarios AS u
ON u.id_user = f.user_soli
LEFT JOIN passageiros AS p
ON p.voucher = f.voucher
where f.id_transfer = '$id_transfer' and cod_bloco_faturamento = '$bloco' ";
$resultado = mysql_query($sql) or die( mysql_error());
while ($linha = mysql_fetch_assoc($resultado)) {
$bloco = $linha["cod_bloco_faturamento"];
$id_empresa = $linha["id_empresa"];
$valor1 = $linha["valor"];
$valor = 'R$' . number_format($valor1, 1, ',', '.');
$vencimento = $linha["data_vencimento"];
What are the values contained in it ?
– Edilson
i am entering that data 1052,1053,1054 more am inserting in db through "serialize' this being written so la a:3:{i:1052;s:4:"1052";i:1053;s:4:"1053";i:1054;s:4:"1054";}
– Fabio Henrique