> For the complete documentation index, see [llms.txt](https://arinem.gitbook.io/sqlsk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://arinem.gitbook.io/sqlsk/docs/getting-values-from-the-database.md).

# Getting values from the database

## Type: expression

## Syntax:

```
[sqlsk] mysql %database object% query %query% and get [string] %string%
```

## Examples:

Table **Kings**

| kingid | name     |
| ------ | -------- |
| 1      | Noob     |
| 2      | Notch    |
| 3      | Jeb\_    |
| 4      | ProGamer |

```java
 set {_db} to mysql conn for "localhost;minecraft;admin;secretpass"
 set {_q::*} to mysql {_db} query "SELECT * FROM `kings`" and get "name"
 send "All kings: %{_q::*}%" to all players
 // It send: All kings: Noob, Notch, Jeb_ and ProGamer 
```
