Hello,
I have been breaking my head here and I can't figure out what I am doing wrong, I am trying the get the result of the first query into variables to then run the second query. It works inside mysql but not insite my php query.
$data = mysql_query("select * from (select * from logsbk ORDER BY id DESC) AS x GROUP BY dbname") or die(mysql_error());
while($info = mysql_fetch_array( $data )) {
$now = $info['now'];
$rjw = $info['dbname'];
$presize = mysql_query('SELECT dbname AS "dbname2",SUM((size) / 1024) AS "size2" from logsbk WHERE dbname = '$rjw' AND now = '$now'') or die(mysql_error());
while($info2 = mysql_fetch_array( $presize )) {
$now2 = $info2['size2'];
$rjw2 = $info2['dbname2'];
echo "<BR>";
echo $rjw2." ".$now2;
}
}
This turns out blank... no info, etc