左连接在CMD提示符中工作,而不是PHP

I have a LEFT JOIN SELECT statement that looks as follows:

SELECT submissions.subid, submissions.title, submissions.date, files.file
FROM submissions
LEFT JOIN files ON submissions.subid=files.subid
WHERE uid='1'
ORDER BY subid DESC;

This query returns exactly what I want it to when run from a MySQL command prompt, but when attempting to display the results in PHP using the following code, it returns nothing:

$subResult=mysql_query($querySub, $connection);

while($sub = mysql_fetch_assoc($subResult)){

    $subs[] = $sub;

}

foreach($subs as $k => $v) {

    foreach($v as $key => $val) {

    echo $k." ".$v."<br />";

    }

}

Does anyone know why this would be returning a perfectly fine result in command line, but not in php? I know it's not my database connection, as it is working fine for other tasks on the same page of code. I should mention one of the returned fields contains binary data stored in a BLOB.

You've got two loops - the inner one is:

foreach($v as $key => $val) {

You're not using either $key or $value - what happens if you remove that loop?