Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

missing rows

Status
Not open for further replies.

tranquillo

Technical User
Jan 6, 2003
22
SE
hey... I must be doing something wrong... I just don't know what... to me it don't seem logical at all... the code that is pressented below is to list gigs for a couple of musicians... it's ordered by date and for some reason it refuses to show one row... why?

---------------------------------------

$result2 = mysql_query("SELECT * FROM spelningar where spelningar.datum >= current_date AND
spelningar.artist='wieskahubert' order by datum",$db);

---------------------------------------


if ($myrow = mysql_fetch_array($result2)) {

do {
echo &quot;<table width='270' border='0' cellpadding='0' cellspacing='0' class='textsmall' bgcolor=\n&quot;;
echo ($var%2) ? &quot;'#CCCCCC'><tr><td align='left'>&quot; : &quot;'#FFFFFF'><tr><td align='left'>&quot;;
$var++;

printf(&quot;%s</td><td align='left' width='120'>%s</td><td align='left' width='60'>%s&quot;,
$myrow[&quot;datum&quot;], $myrow[&quot;plats&quot;], $myrow[&quot;land&quot;]);

echo &quot;</td><td></td></tr></table>\n&quot;;

} while ($myrow = mysql_fetch_array($result2));
} else {
echo &quot;Sorry, no records were found!&quot;;
}

----------------------------------------------

if I write the SQL queary directly to the MySQL there's no problem. so there's nothing wrong with the dates...

thanks...

-s
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top