• User

    Problema 'Query was empty SQL'

    Aiuto: Query failed: Query was empty SQL
    Non riesco a capire dove ho sbagliato, e perchè non mi richiama le variabili:
    :mmm:

    ecco il mio errore:

    //p e r s o n a l i z z a z i o n e
    $sSQL1 = "SELECT * FROM ".PREFIX."products where id=".$view;
    $result1=$db->query($sSQL1);
    $rss1=$result1->fetch();
    $rows1=$result1->size();
    if($rows1!=0)
    {

    // get member details //
    
    
    $sSQL = "SELECT id,due,cinque,sei,sette,extra,extra2 FROM ".PREFIX."users where id='".$rss1['owner']."'";
    $result=$db->query($sSQL);
    $rss=$result->fetch();
    $rows=$result->size();
    if($rows==0)
    
    
    $sSQL2 = "SELECT id,tr17,tr18,tr19,tr20,
    

    vr21,vr22,vr23,vr24,vr25,vr26 FROM ".PREFIX."products where id=".$view;
    $result2=$db->query($sSQL2);
    $rss2=$result2->fetch();
    $rows2=$result2->size();
    if($rows2!=0)
    {
    $class_tpl->assign('title', LANG_ERROR);
    $class_tpl->assign('pPageContent', LANG_MEMBER_ERROR);
    $class_tpl->assign('body','content.tpl.php');
    }
    else

    {

    //assign the variables

        //assign the variables
        $class_tpl->assign('due', safeStripSlashes($rss['due']));
        $class_tpl->assign('cinque', safeStripSlashes($rss['cinque']));
        $class_tpl->assign('sei', safeStripSlashes($rss['sei']));
        $class_tpl->assign('sette', safeStripSlashes($rss['sette']));
        $class_tpl->assign('extra0', safeStripSlashes($rss['extra']));
        $class_tpl->assign('extra2', safeStripSlashes($rss['extra2']));
    

    $class_tpl->assign('tr17', safeStripSlashes($rss['tr17']));
    $class_tpl->assign('tr18', safeStripSlashes($rss['tr18']));
    $class_tpl->assign('tr19', safeStripSlashes($rss['tr19']));
    $class_tpl->assign('tr20', safeStripSlashes($rss['tr20']));
    $class_tpl->assign('vr21', safeStripSlashes($rss['vr21']));
    $class_tpl->assign('vr22', safeStripSlashes($rss['vr22']));
    $class_tpl->assign('vr23', safeStripSlashes($rss['vr23']));
    $class_tpl->assign('vr24', safeStripSlashes($rss['vr24']));
    $class_tpl->assign('vr25', safeStripSlashes($rss['vr25']));
    $class_tpl->assign('vr26', safeStripSlashes($rss['vr26']));


  • ModSenior

    Ciao gppromano,

    intanto dovresti vedere quale di quelle query da questo errore.


  • User

    Come potrei fare?


  • ModSenior

    Puoi lasciare una sola query per volta in modo da vedere quale genera l'errore andando per esclusione.