Ne zaman bir "WHERE" sorgu sonucu dönen değil

0 Cevap php

Aşağıdaki sorgunun herhangi bir sonuç döndürüyor değil. Ben çalışan ve farklı tek şey aşağıdaki durumun eklenmesidir bir sorgudan kopyaladığınıza:

NEREDE submissionid = $ submissionid

Herhangi Bu sorgunun herhangi bir sonuç döndürüyor değil neden fikir?

$sqlStr2 = "SELECT 
                s.loginid
                ,s.title
                ,s.url
                ,s.displayurl
                ,s.datesubmitted
                ,l.username
                ,s.submissionid
                ,COUNT(c.commentid) countComments
             FROM submission s
            INNER JOIN login l ON s.loginid = l.loginid
       LEFT OUTER JOIN comment c ON s.submissionid = c.submissionid
              GROUP BY s.submissionid
             NEREDE submissionid = $ submissionid
             ORDER BY s.datesubmitted DESC
             LIMIT 10";

$tzFrom2 = new DateTimeZone('America/New_York'); 
$tzTo2 = new DateTimeZone('America/Phoenix'); 

$result2 = mysql_query($sqlStr2);

$arr2 = array(); 
echo "<table class=\"samplesrec\">";
while ($row2 = mysql_fetch_array($result2)) { 
    $dt2 = new DateTime($row2["datesubmitted"], $tzFrom2); 
    $dt2->setTimezone($tzTo2);
    echo '<tr>';
    echo '<td class="sitename1"><a href="http://www.'.$row2["url"].'" TARGET="_blank">'.$row2["title"].'</a>  <div class="dispurl">'.$row2["displayurl"].'</div></td>';
    echo '</tr>';
    echo '<tr>';
    echo '<td class="sitename2name">Submitted by <a href="http://www...com/.../members/index.php?profile='.$row2["username"].'">'.$row2["username"].'</a> on '.$dt2->format('F j, Y &\nb\sp &\nb\sp g:i a').'</td>';
    echo '</tr>';
    echo '<tr>';
    echo '<td class="sitename2"><a href="http://www...com/.../comments/index.php?submissionid='.$row2["submissionid"].'">'.$row2["countComments"].' comments</a></td>';
    echo '</tr>';
    }
echo "</table>";

0 Cevap