Download the PHP package ticketsource/sql-anywhere-client without Composer
On this page you can find all versions of the php package ticketsource/sql-anywhere-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ticketsource/sql-anywhere-client
More information about ticketsource/sql-anywhere-client
Files in ticketsource/sql-anywhere-client
Package sql-anywhere-client
Short Description SAP SQL Anywhere PHP client library
License MIT
Informations about the package sql-anywhere-client
SQLAnywhereClient
Classe para conexão com banco de dados Sybase com PHP baseada na biblioteca sqlanywhere. Class for connection with database Sybase with PHP, created for PHP library SqlAnywhere.
The development was based on PDO Native Class.
TODO:
- More tests.
Installation
=================
1- First install sqlanywhere module for PHP Click Here!.
2- Use composer to install this package adding the lines bellow in the require section require
:
// ...
"require": {
"cagartner/SQLAnywhereClient": "dev-master"
},
// ...
How to use
Bellow have some examples of how to use this class.
Connection SQLAnywhereClient::__construct
:
Você pode definir duas opções iniciais junto com a conexão, que são as seguintes: auto_commit
e is_persistent
.
You can define two initials configuration params with the connection: auto_commit
and is_persistent
.
auto_commit
Enable auto commit, default istrue
;is_persistent
Define persistent mode, default isfalse
;
Executing SQL commands SQLAnywhereClient::exec()
:
Executing SQL commands with retrieve of data SQLAnywhereClient::query()
:
This method return an array with the data
Retrieve just one line SQLAnywhereQuery::fetch
Return first row
Data format returns
You can choose how is the format that your data is retrieve SQLAnywhereClient
Example:
Return all rows SQLAnywhereQuery::fetchAll
Return all selected rows
In this method you also can choose the format of return too:
Row count SQLAnywhereQuery::rowCount
Return the count of rows
Or with count
alias:
Field count SQLAnywhereQuery::fieldCount
Return the total of fields
Last ID SQLAnywhereClient::lastInsertId()
Return the last inserted ID
Prepared Statement SQLAnywhereClient::prepare()
:
Prepared Statement with ?
:
And this params names: