Help in While loop

Post Reply
hiti
Posts: 26
Joined: Tue Aug 07, 2007 3:37 am

Help in While loop

Post by hiti »

Plz help me with the syntax of while loop when i applied the below code without while loop it works but when i put in the while loop as shown below it gives o/p like
<depth=902+10>
<table>
</table>



Here is my code

<script language=vortex>
<EXPORT $db QUERY USEROK>
<EXPORT $cq QUERY USEROK><!-- users catno query -->
<EXPORT $Catno QUERY USEROK><!-- users catno query -->
<timeout=-1></timeout><!-- no overall script timeout -->
<a name=main public>
<depth=$start+10>
<while $start lt $depth>
<table>
<$db=/usr/local/morph3/texis/TechNews/db1>
<if $dt neq "">
<sql db=$db "select id, convert(Catno,'int') Catno, SiteName, StoryTitle, StoryDescription, Url, BloggerName,convert(Modified, 'date') Modified from html where SiteName!='' and StoryTitle!='' and StoryDescription!='' and Modified >= '$dt'">
<tr>
<td>$id
<td>$Catno
<td>$SiteName
<td>$StoryTitle
<td>$StoryDescription
<td>$Url
<td>$BloggerName
<td>$Modified
</sql>
<else>
<sql db=$db "select id, convert(Catno,'int') Catno, SiteName, StoryTitle, StoryDescription, Url, BloggerName, convert(Modified, 'date') Modified from html where SiteName!='' and StoryTitle!='' and StoryDescription!=''">
<tr>
<td>$id
<td>$Catno
<td>$SiteName
<td>$StoryTitle
<td>$StoryDescription
<td>$Url
<td>$BloggerName
<td>$Modified
</sql>
</if>
</table>
<start=$start+1>
</while>
</a>
</script>

The query string contains the value of start variable.
I want to pick 10 records at a time that is the reason i have put it into the while loop.
Plz guide how to fix this problem
Thnks
Hiti
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Help in While loop

Post by mark »

I'm moving this to the Vortex group as this is not related to webinator 2.5 where it was posted.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Help in While loop

Post by mark »

<depth=$start+10>
should be
<$depth=($start+10)>
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Help in While loop

Post by mark »

And
<start=$start+1>
should be
<$start=($start+1)>
Post Reply