Jump to content

row


Kelly003

Recommended Posts

3 hours ago, Kelly003 said:

how to do that if no row is selected, nothing is done, and if row 1 is selected, it performs the first function (already written by me) and if we select row 2, it performs the second function?

If you have performed a SELECT with an ORDER BY condition then you can depend on the order of the returned rows. By using dbPoll or dbQuery you can obtain an indexed table of returned rows. If you loop over the rows by index, you can execute code that depends on the index. By using a Lua if-condition that depends on the loop index you can execute different code depending on the row index.

Does that make sense to you?

Link to comment
2 hours ago, Kelly003 said:

Kenix 

I know it, but I don't know what is the function to do it.

Can you show what you have scripted so far? You say that you have no idea but we could tell you if you made a good attempt anyway or what is missing from your current approach.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...