Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/levydsa/libsql-php


https://github.com/levydsa/libsql-php

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        




libSQL PHP


libSQL PHP


Databases for PHP multi-tenant AI Apps.


Turso ยท
Docs ยท
Quickstart ยท
SDK Reference ยท
Blog & Tutorials




MIT License




Discord




Contributors




Total downloads




Examples


## Features

- ๐Ÿ”Œ Works offline with [Embedded Replicas](https://docs.turso.tech/features/embedded-replicas/introduction)
- ๐ŸŒŽ Works with remote Turso databases
- โœจ Works with Turso [AI & Vector Search](https://docs.turso.tech/features/ai-and-embeddings)

> [!WARNING]
> This SDK is currently in technical preview. Join us in Discord to report any issues.

## Install

```bash
composer require turso/libsql
```

## Quickstart

The example below uses Embedded Replicas and syncs data every 1000ms from Turso.

```php
connect();

$createUsers = "
CREATE TABLE IF NOT EXISTS users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT
);
INSERT INTO users (name) VALUES ('Iku');
";

$conn->executeBatch($createUsers);

$conn->query("SELECT * FROM users WHERE id = ?", [1])->fetchArray();
```

## Documentation

Visit our [official documentation](https://docs.turso.tech/sdk/php).

## Support

Join us [on Discord](https://tur.so/discord-php) to get help using this SDK. Report security issues [via email](mailto:[email protected]).

## Contributors

See the [contributing guide](CONTRIBUTING.md) to learn how to get involved.

![Contributors](https://contrib.nn.ci/api?repo=tursodatabase/libsql-php)



good first issue