-
Notifications
You must be signed in to change notification settings - Fork 5
leya.getWhere
Kevin Gerken edited this page Jun 25, 2018
·
1 revision
leya.getWhere(table, column, conditionColumn, operator, value)
Returns the value of one or multiple fields in the database, where the specified condition is true.
- table The table you want to search in
- column The column you want to get
- conditionColumn The column you are testing
- operator The operator to specify for example if a value should be less than something
- value The value you are testing with
-
<
less than -
<=
less than or equal -
>
greater than -
>=
greater than or equal -
=
equal -
!=
not equal
- String Value of the field, when there is only one result
- Array Values of the field, when there are multiple results
- -1 row doesn't exist
; We are looking in the table "users" for the "name" column, where rank is less than 5
lowPlayers := leya.getWhere("users", "name", "rank", "<", 5)
; show 3 players
msgbox % lowPlayers[1] lowPlayers[2] lowPlayers[3]