I'm trying to do 2 PHP queries ...
basically it would be the first one:
$sql = \mysql_query("SELECT * FROM tblaccounts WHERE date BETWEEN '2015-12-25 0:00:00' AND '2016-07-20 23:59:00'");
the results of this query I need to be able to use them to generate the data of another query ... example:
while($r2 = mysql_fetch_array(mysql_query("SELECT * FROM tblinvoiceitems WHERE invoiceid = '$RESULTADO_DE_LA_PRIMERA_CONSULTA'"))){
echo "'.$r2[invoiceid].'";
}
If you see in the query there is another variable that would be the result of the first query ....
the first query throws a series of fields of 1 table ....
How could this be achieved?