> On Tuesday 03 June 2003 13:58, Jay Blanchard wrote:
> > [snip]
> > We would have to see some code....
> >
> > Jay
>
> I'm not able to reproduce this in a short code-snippet.
> But from the first echo to the last echo $lid change its value:

Either this is a bad cut and paste job or this script will never run because
it's full of errors. Either way, if $lid changes, it's because you're
changing it. Maybe you have an if($lid = 'value') instead of if($lid ==
'value') somewhere?

>       if ($hostid==31) echo "lid1: $lid";
>
>       # Paragraphs
>       #
>       if ($bodytype==1) {
>          sql_query("UPDATE tblArticleParagraph SET sort=-1 WHERE
artid=$lid
> AND hostid=$session_hostid");
>          $tmpbody = '';
>          for ($i=0; $i<count($paragraphs); $i++) {
>             $popt = 1;
>             $popt = $popt | (($parhardoutline[$i]) ? 0x2 : 0);
>             $parpicurl[$i] = preg_replace("/'/s",'"',$parpicurl[$i]);
>             $parheadline[$i] = trim($parheadline[$i]);
>             $parpictext[$i] = trim($parpictext[$i]);
>             if ($hostoptions&0x80) {      # STRICT FONT/STYLE STRIP
>                $parparagraph[$i] = stripFontAndStyle($parparagraph[$i]);
>             }
>             sql_query("INSERT INTO tblArticleParagraph
> (hostid,artid,sort,options,headline,picurl,paragraph,pictext)
>                VALUES
>
($session_hostid,$lid,$i,$popt,'$parheadline[$i]','$parpicurl[$i]','$parpara
graph[$i]','$parpictext[$i]')");
>             $tmpbody .= $parheadline[$i];
>             $tmpbody .= ' ';
>             $tmpbody .= $parparagraph[$i];
>             $tmpbody .= ' ';
>          }
>          sql_query("UPDATE tblArticle SET body='$tmpbody' WHERE id=$lid
AND
> hostid=hostid=$session_hostid");
>          sql_query("DELETE FROM tblArticleParagraph WHERE artid=$lid AND
> sort=-1 AND hostid=$session_hostid");
>       }
>
>       if ($special && $formid) {
>          # form based article publishing
>          # arnt h, Feb 03
>          list($tformid,$treplyid) = sql_queryandfetch("SELECT
formid,replyid
> FROM refArticleForm WHERE hostid=$session_hostid AND artid='$saveid'

You do not finish the above SQL statement

>          if (!$tformid && !$treplyid) {
>             sql_query("INSERT INTO refArticleForm
> (hostid,artid,formid,replyid) VALUES
($session_hostid,$saveid,$formid,0)");
>             $tformid = $formid;
>          }
>          $surveyid = $tformid;
>          $hostid = $session_hostid;
>          $arntid = $id;
>          $id = $saveid;
>          $arntpublic_userid = $public_userid;
>          $public_userid = 0;
>          include 'include/surveysavereply.inc';     ## perform saving
>          $public_userid = $arntpublic_userid;
>          $id = $arntid;
>          sql_query("UPDATE refArticleForm SET replyid=$thisreplyid WHERE
> artid=$saveid AND hostid=$session_hostid");
>          $tmp = '';
>          reset($surveykeyval);
>          foreach ($surveykeyval as $key  => $val) {
>             for ($xxi=0; $xxi<count($val); $xxi++) {
>                $tmpval = $val[$xxi];
>                if (!$tmpval) continue;
>                $tmpval = preg_replace('/\|\{.*?\}/','',$tmpval);
>                $lbl = "fbq_".$key;
>                $tmp .= "<$key lbl=\"".$$lbl."\">$tmpval</$key>\r\n";
>             }
>          }
>          # $tmp = '<bodyxml>'.$tmp.'</bodyxml>';
>          sql_query("UPDATE tblArticle SET body='$tmp' WHERE id=$saveid AND
> hostid=$session_hostid");
>       }
>
>       # Save tblArticleExtension
>       #
>       list($tmp) = sql_queryandfetch("SELECT id FROM tblArticleExtension
WHERE
> artid=$lid AND hostid=$session_hostid");
>          if ($tmp) sql_query("UPDATE tblArticleExtension SET
>
custom1='$custom1',custom2='$custom2',custom3='$custom3',custom4='$custom4'
> WHERE ar

Same here...

>       elseif ($custom1||$custom2||$custom3||$custom4) sql_query("INSERT
INTO
> tblArticleExtension (hostid,artid,custom1,custom2,custom3,custom4) V

and here...

Those alone will cause a ton of parse errors.

>
>       if ($hostid==31) echo "<hr>lid2:$lid";

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to