NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: ntnewbies on January 18, 2018, 09:45:15 AM

Title: SQL Filter for the browse
Post by: ntnewbies on January 18, 2018, 09:45:15 AM
Hi friends,
i have a database called Tips. I need to get a random record from the database with the filter of category field.

if i put the following line in sql, i get the value that i want:

SELECT TOP 1 TPI_TipsID FROM dbo.Tips where tpi_category = 'events' ORDER BY NEWID()

How do i put the above line into the NetWebBrowse filter?

If i put it like the following, it doesnt work:

LOC:FilterWas = SQL('SELECT TOP 1 TPI_TipsID FROM dbo.Tips where tpi_category = 'events' ORDER BY NEWID()')

How do i go about it?

I have tried PROP:SQL like below but how to get the value out of it?

Tips{PROP:Sql}= 'SELECT TOP 1 TPI_TipsID FROM dbo.Tips ORDER BY NEWID()'
Next(Tips)
LOC:No = TPI:TipsID