Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Feb 2004
    Posts
    11

    Default Urgent Mysql error

    Hi,

    I just moved from Ensim, and I'm getting a lot of errors like these on scripts that were working perfectly well:

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/site/public_html/admon/altas.php on line 98

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/site/public_html/admon/altas.php on line 116

    Line 98: while ($row=mysql_fetch_array($result)){
    Line 116: mysql_free_result($result);

    Please, any help would be appreciated.

    Thanks.

  2. #2
    Member
    Join Date
    Mar 2004
    Posts
    8

    Default

    do you have $result near those line?

  3. #3
    Member
    Join Date
    Feb 2004
    Posts
    11

    Default

    no, not at all.

    This is the cluster:

    <?
    $CuentaCols=1;
    $CuentaRow=0;
    $RSSubS = mysql_query("SELECT * FROM ContProductos where IdCategoria = $IdCategoriaPDD",$link);
    $myrow = mysql_fetch_array($RSSubS);
    $num_rows = intval(mysql_num_rows($RSSubS));
    If ($num_rows>0) {
    do {
    $IdItemDD = trim($myrow["IdItem"]);
    $ProdDD = trim($myrow["NombreProd"]);
    $ImagenDD = trim($myrow["Imagen"]);

    if ($CuentaCols==1) {
    echo "<tr>";
    }
    ?>
    <td>&nbsp;</td>
    <td width="133" valign="top" class="parrafo"> <p align="center">
    <? if ($ImagenDD!="NA") { ?><a href="VerProducto.php?IdCatPP=<?= $IdCatP?>&IdCatP=<?= $IdCategoriaPDD ?>&Prod=<?= $IdItemDD ?>"><img src="UpImg/<?= $ImagenDD ?>" border="0"></a><br><? } ?>
    <span class="parrafo"><a href="VerProducto.php?IdCatPP=<?= $IdCatP ?>&IdCatP=<?= $IdCategoriaPDD ?>&Prod=<?= $IdItemDD ?>" class="parrafo3"><?= $ProdDD ?></a> </span></p>
    </td>
    <?
    if (($CuentaCols==3) or ($CuentaRow==$num_rows-1)) {
    echo "</tr>\n"
    ."<tr>\n"
    ." <td height=\"3\" colspan=\"4\"><img src=\"../img/1trasp.gif\" width=\"1\" height=\"25\"></td>"
    ."</tr>";
    }
    $CuentaCols = $CuentaCols +1;
    $CuentaRow = $CuentaRow +1;
    ?>
    <?
    } while ($myrow = mysql_fetch_array($RSSubS));
    } else {
    echo "<tr>\n"
    ." <td height=\"3\" colspan=\"4\"><img src=\"../img/1trasp.gif\" width=\"1\" height=\"25\"></td>"
    ."</tr>";
    }
    mysql_free_result ($RSSubS);
    } while ($myrow = mysql_fetch_array($RSCat));
    }
    mysql_free_result ($RSCat);
    ?>

    This was working perfectly on my ensim server.

  4. #4
    Member
    Join Date
    Mar 2004
    Posts
    8

    Default

    it was looking $result.

Similar Threads & Tags
Similar threads

  1. URGENT: mysql error...sudden
    By Secret Agent in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 05-23-2005, 04:16 PM
  2. MYSql Need Urgent Help
    By kamals in forum New User Questions
    Replies: 1
    Last Post: 12-02-2004, 11:35 PM
  3. mysql error, urgent please help
    By Secret Agent in forum cPanel and WHM Discussions
    Replies: 11
    Last Post: 11-22-2004, 10:29 PM
  4. Mysql help urgent.
    By webarts in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-30-2004, 09:05 PM
  5. urgent mysql help
    By shann in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-18-2003, 12:38 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube