mysql - php mysqlquery with subquery and group by -


i trying fill table informations out of query getting error 500. doing wrong?

for($count = 0; $count < $200; $count++)     {     $result = mysql_query("select jp.artnum, jp.bezeichnung, sum(jp.menge), rdatum                         journalpos jp, journal j                         j.rec_id=jp.journal_id , artnum not null , jp.journal_id in                         (select rec_id journal rdatum between now() - interval 1 day , now() )                         group artnum                          limit $count , 30")     or die(mysql_error());     $row = mysql_fetch_array( $result );     echo "<tr>";     echo "<td>";     echo $row['jp.artnum'];     echo "</td>";      echo "<td>";     echo $row['jp.bezeichnung'];     echo "</td>";      echo "<td>";     echo $row['sum(jp.menge)'];     echo "</td>";      echo "<td>";     echo $row['rdatum'];     echo "</td>";     echo "</tr>";     } 

it worked without sum function (then can leave group away) , without subquery !

one error found in line

for($count = 0; $count < $200; $count++) 

$200 incorrect syntax.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -