Filters in NeoCms - Forum

Forum Navigation
You need to log in to create posts and topics.

Filters in NeoCms

Hello @luishp , I do not know how to use the NeoCms commands to perform this query:

'SELECT * FROM quotes ORDER BY RANDOM() LIMIT 1;'

Where quotes is a NeoCms Collection of more than 75,000 famous phrases that I have imported and of which I want with the select to show one randomly.

I do not know how to use the filters so I have chosen to make a php with the connection to the database and run the SELECT and get the JSON data with the QUOTE and AUTHOR ,and  from VisualNeo make a AJAX request.

It works perfect, but I would like to know if i can do it with the filters or if you can, add a command that you can make your own SELECT .

The result can be seen on my website.

Greetings!

I notice also that the command neoTypeWriterInitialize only admit a direct html lines, it could be usefull if it can admit a var.

 

@emmanuel-fernandez use neoCmsSearchCollection with "Limit number of results to" 1 and a random number in "Items to skip"

I notice also that the command neoTypeWriterInitialize only admit a direct html lines, it could be usefull if it can admit a var.

Just put you var and it will work just the same:

SetVar [myvar] "Line1\n Line 2\n Line 3"
neoTypeWriterInitialize "Container1" 100 100 true "[myvar]"

Regards.

emo has reacted to this post.
emo

Genial, luego lo pruebo! desde luego que hay veces que me complico la vida ;-)