You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Alguien podria ayudarme? aqui les dejo el codigo
Código PHP:
   <?php require_once('Connections/listproduc.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
 
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
 
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
 
mysql_select_db($database_listproduc, $listproduc);
$query_Recordset1 = "SELECT * FROM categoria WHERE id_marca = 0";
$Recordset1 = mysql_query($query_Recordset1, $listproduc) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
 
mysql_select_db($database_listproduc, $listproduc);
$query_Recordset7 = "SELECT * FROM categoria WHERE id_marca = 1";
$Recordset7 = mysql_query($query_Recordset7, $listproduc) or die(mysql_error());
$row_Recordset7 = mysql_fetch_assoc($Recordset7);
$totalRows_Recordset7 = mysql_num_rows($Recordset7);
 
mysql_select_db($database_listproduc, $listproduc);
$query_Recordset8 = "SELECT * FROM producto WHERE PKIDCAT =".$row_Recordset1['PKID'];
$Recordset8 = mysql_query($query_Recordset8, $listproduc) or die(mysql_error());
$row_Recordset8 = mysql_fetch_assoc($Recordset8);
$totalRows_Recordset8 = mysql_num_rows($Recordset8);
?>
 
  <p>jdhehdfhekdhke</p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th scope="col"> </th>
  </tr>
  <tr>
    <th scope="col"><?php do { ?>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="5%"> </td>
      <td colspan="2" class="tituloPROD"><?php 
 
      
      echo $row_Recordset1['nombre']; ?>        </td>
    </tr>
   <?php mysql_select_db($database_listproduc, $listproduc);
        $query_Recordset2 = "SELECT * FROM producto WHERE PKIDCAT =".$row_Recordset1['PKID'];
        $Recordset2 = mysql_query($query_Recordset2, $listproduc) or die(mysql_error());
        
        $totalRows_Recordset2 = mysql_num_rows($Recordset2);
        
        while($prod=mysql_fetch_assoc($Recordset2)){?>
 
        
        <tr>
            <td> </td>
            <td width="8%"> </td>
          <td width="87%" colspan="2" class="descPROD">
        <a href="ficha_productos.php?PKID=<?php echo $prod['PKID']; ?>"><?php echo $prod['nombre']; }?>  </a></td>    
    </tr>       
  </table>
  <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> </th>
  </tr>
  <tr>
    <th scope="col"> </th>
  </tr>
</table>
  
 
  <p> </p>
<?php do { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <th width="5%" scope="col"> </th>
        <th colspan="2" scope="col"><div align="left"><?php echo $row_Recordset7['nombre']; ?></div></th>
    </tr>
     <?php mysql_select_db($database_listproduc, $listproduc);
        $query_Recordset8 = "SELECT * FROM producto WHERE PKIDCAT =".$row_Recordset7['PKID'];
        $Recordset8 = mysql_query($query_Recordset8, $listproduc) or die(mysql_error());
        
        $totalRows_Recordset8 = mysql_num_rows($Recordset8);
        
        while($produc=mysql_fetch_assoc($Recordset8)){?>
      <tr>
        <th scope="row"> </th>
        <td width="8%" scope="row"> </td>
        <td width="87%" scope="row"><a href="ficha_productos.php?PKID=<?php echo $prod['PKID']; ?>"><?php echo $produc['nombre']; }?>  </a></td>
    </tr>
  </table>
  <?php } while ($row_Recordset7 = mysql_fetch_assoc($Recordset7)); ?><p>
    <?php
mysql_free_result($Recordset1);
 
mysql_free_result($Recordset7);
 
mysql_free_result($Recordset8);
?>
</p>
  <p>ifhefhr</p>   
 
