error in my script.

Discussion in 'Troubleshooting' started by robiko997, Aug 13, 2009.

  1. robiko997

    robiko997 New Member

    Joined:
    May 11, 2009
    Messages:
    13
    Hello....In my script i have error before this code :

    <?php while($result=mysql_fetch_array($query)){ $av1=mysql_query('select name from avatars where login=\''.$result['podgladajacy'].'\''); ?>
    <tr>
    <td>
    <div class="shade"><img src="<?php echo ADRES_STRONY; ?>files/photos/avatar/<?php if($user_avatar=mysql_fetch_array($av1)){ echo $user_avatar['name'];} else {echo 'noavatar.png';} ?>" height="100" width="100"></div>

    i see error : WARNING: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in line 62 of file podgladacz.php

    Fatal error: Call to a member function log_error() on a non-object in /home/ertiosss/www/members/rconfig.inc.php(19) : eval()'d code(1) : eval()'d code on line 389

    what is this :( ... I need your help..thanks
  2. kengary

    kengary aMember Pro Customer

    Joined:
    Nov 13, 2008
    Messages:
    231
    Did you set $query before the while loop?

Share This Page