Download the PHP package windwork/db without Composer

On this page you can find all versions of the php package windwork/db. 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 db

Windwork MySQL数据库访问组件

可通过选择不同的驱动连接MySQL查询。

安装

该组件已包含在Windwork框架中,如果你已安装Windwork框架则可以直接使用。

数据库读写

数据库实例创建

数据库操作对象可执行如下方法进行数据库读写:

使用案例

SQL防注入

我们通过sql格式化以后,可有效防注入。

以%作为标识,%后面的字符为格式化参数的数据类型。支持的类型有:

例如:

使用事务

使用事务的前提是:你使用的引擎必须支持事务。MyISAM、MEMORY引擎不支持事务,InnoDB引擎支持事务。MySQL经过多年的发展,InnoDB引擎已经是MySQL引擎中最有优势的引擎,所以推荐你优先使用InnoDB引擎。

可以嵌套启用事务,最终只在最上一级事务提交后才会真正执行事务。

使用事务的案例:

数据库连接配置参数

TODO




要了解更多?


All versions of db with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
ext-pdo_mysql Version *
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 windwork/db contains the following files

Loading the files please wait ....