getting Body

shaker31280
Posts: 3
Joined: Tue Jul 24, 2001 4:48 pm

getting Body

Post by shaker31280 »

I want to get the Body field of an entry in my SQL Table. But I do not want the SQL variables to all reset, includding, next, loop, and index count. I only want to get the Body of a specific URL. so I write

<SQL "select Body from html where Url='www.mysite.com/index.html'"></SQL>

But being that I ran an SQL command before this , it changes all its previous values, I want to run this command or any command that I can grab the Body of lets say the index page, without reseting all the variables. Maybe I should not be using an SQL command, but then how do I grab that field? I appreciate any help
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

getting Body

Post by Kai »

You'll have to save them in temp variables, say with a <LOCAL>, and then restore them after your 2nd <SQL>:

<LOCAL sloop=$loop snext=$next sindexcount=$indexcount>
<SQL "select Body ..."></SQL>
<$loop = $sloop><$next = $snext><$indexcount = $sindexcount>
</LOCAL>