Download the PHP package davewid/peyote without Composer

On this page you can find all versions of the php package davewid/peyote. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package peyote

Peyote

A MySQL query builder engine for PDO which requires PHP 5.3.

Installation

The easiest way to install Peyote is by adding this line to your composer.json file.

Optionally you can download the source of this repo and move over the classes folder.

Standards

Peyote follows both the PSR-0 and PSR-1 standards.

There isn't an autoloader included with the library though so you will need to set that up yourself. If you use Composer to install the dependency (highly recommended) then you won't have to worry about anything as Composer will take care of it all.

Example

I'll start out with a full example on how to use the library and break it down as we go along.

Why the getParams() call?

Keeping your queries safe from SQL injection is out of the scope of this library so Peyote uses ? placeholders instead and keeps track of all the data you enter.

If you would echo out $query->compile() you would see this.

At this point getParams() will return an array holding the values you passed in, (in this case, 1).

PDO will handle the placeholder replacement during execute() keeping you a lot safer from SQL injection.

Select

Insert

Update

Delete

Table Statements

As of version 0.6.0, Peyote now comes bundled with statements to help create, alter and drop tables.

Create

Columns

There are 2 ways to create a column. The first is just to type out the raw SQL as as string. The second is to use a \Peyote\Column.

Please see the test folder for more usage examples.

Note: Using serial as the column type will give set the column as an INT, primary key, not null, unsigned and auto increment.

Alter

Drop


Developed by Dave Widmer


All versions of peyote with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package davewid/peyote contains the following files

Loading the files please wait ....