I got error like this: ============================ Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/web/public_html/agenda2.php on line 15 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/web/public_html/agenda2.php on line 64 =================== this my code: ================== [code]<?php include("inc/header_dalam.php"); if(!isset($asu)) { $asu=array(); session_register("asu"); } if(!in_array($idagenda,$asu)) { //echo count($asu)."--"; array_push($asu,$idagenda); $sql_update="Select counter from tbagenda where idAgenda=".$idagenda; $res_update=mysql_query($sql_update); $row_update=mysql_fetch_assoc($res_update); $counter_x=$row_update[counter]+1; $sql_update2="Update tbagenda set counter=$counter_x where idAgenda=".$idagenda; $res_update2=mysql_query($sql_update2); } ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="9"> </td> <td><img src="images/spacer.gif" width="1" height="10"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="317"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td width="9"> </td> <td> <? echo ' <span class="judul">'; echo $judul_agenda; echo '</span>'; ?> </td> <td width="12"> </td> </tr> </table> </td> <td width="99" height="31"> </td> </tr> </table></td> </tr> <tr> <td class="contentdalam" valign="top" height="350"> <br> <table border=0 cellspacing=0 cellpadding=0 width=100%> <tr> <td><a href="agenda.php?ver=<?=$ver?>" class="iber">INDEX <?=$judul_agenda?></a></td> </tr> </table> <br> <!-- startprint --> <table border=0 cellspacing=0 cellpadding=2 width=100%> <? $sqlview = "SELECT * from tbagenda where idAgenda=".$idagenda; $resagenda1 = mysql_query($sqlview); while ($rowagenda1 = mysql_fetch_array($resagenda1)) { echo '<center><strong>'.$rowagenda1[namaAgenda.$bahasa].'</strong><br>'; if($rowagenda1[mulaiAgenda]==$rowagenda1[selesaiAgenda]) { if($bahasa=="_e") { echo date("d M Y", $rowagenda1[mulaiAgenda]).'<br>'; } else { echo TglIndo($rowagenda1[mulaiAgenda],"s"); } } else { if($bahasa=="_e") { echo date("d M Y", $rowagenda1[mulaiAgenda])." - ". date("d M Y", $rowagenda1[selesaiAgenda]).'<br>'; } else { echo TglIndo($rowagenda1[mulaiAgenda],"s")." - ". TglIndo($rowagenda1[selesaiAgenda],"s"); } } echo '<br><br></center>'; echo $rowagenda1[isiAgenda.$bahasa]; } echo '</table>'; ?> <!-- stopprint --> <p align="right"> <? echo '<b>Viewed: '.$viewx.'</b><br>'; echo '<A HREF="#" onClick="window.open(\'send_agenda.php?idagenda='.$idagenda.'&ver='.$ver.'\',\'Send\',\'width=500,height=350,resizable=yes\')">send to friend</a><br>'; ?> <a href="phprint.php">Print Version <img src="images/print.gif" border="0" align="absmiddle"></a> </p> </td> </tr> </table></td> <td width="20"> <td> </tr> </table></td> </tr> </table> <?php include("inc/footer_dalam.php"); ?>[/code] ================= any help will appreciate:) thanks