Results 1 to 5 of 5

Thread: What am I doing wrong? [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2005
    Posts
    131

    Resolved What am I doing wrong? [RESOLVED]

    Why am I getting the error:
    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/content/b/i/k/mydirectory/html/ax0!calRe367/view.php on line 13

    but it still shows me the data underneath it


    VB Code:
    1. <?php
    2. include("cn.php");
    3. include("commonview.php");
    4. checklogin();
    5.  
    6. $sql = "SELECT * FROM calendar";
    7. $calendar = mysql_query($sql) or die(mysql_error());
    8.  
    9.  
    10. echo '<table>
    11.     <tr>';
    12.  
    13. while ($calendar = mysql_fetch_array($calendar)) {
    14.  
    15.     if ($i == 2) {
    16.         echo '</tr><tr>';
    17.         $i = 0;
    18.     }
    19.  
    20.     echo '<td><b>' . $calendar['dept'] . '</b><br>';
    21.     echo $calendar['mon'] . '<br>';
    22.     echo $calendar['tues'] . '<br>';
    23.     echo $calendar['wed'] . '<br>';
    24.     echo $calendar['thurs'] . '<br>';
    25.     echo $calendar['fri'] . '<br>';
    26.     echo $calendar['sat'] . '<br>';
    27.     echo $calendar['sun'] . '<br><br></td>';
    28.  
    29.     $i++;
    30. }
    31.  
    32. echo '</tr></table><br>';
    33.  
    34. ?>
    Last edited by espylacopa; May 24th, 2005 at 04:51 PM.
    Things fall apart which the center cannot hold...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width