https://github.com/tursodatabase/libsql-php
libSQL bindings for PHP
https://github.com/tursodatabase/libsql-php
Last synced: about 2 months ago
JSON representation
libSQL bindings for PHP
- Host: GitHub
- URL: https://github.com/tursodatabase/libsql-php
- Owner: tursodatabase
- License: mit
- Created: 2024-09-08T02:17:59.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-10-21T20:24:54.000Z (8 months ago)
- Last Synced: 2024-10-22T14:49:16.982Z (8 months ago)
- Language: PHP
- Size: 83.1 MB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
libSQL PHP
Databases for PHP multi-tenant AI Apps.
Turso ·
Docs ·
Quickstart ·
SDK Reference ·
Blog & Tutorials## 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.
