Download the PHP package octa-php/octa-pdo without Composer

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

OctaPDO

A light-weight PHP-PDO database class, this database class is inspired by codeigniter's active record.

Build Status Latest Stable Version Total Downloads Coverage Status License Badges

Author

Melquecedec Catang-catang

Getting Started

installing OctaPDO via composer.

Prerequisites

How To Use

OctaPDO needs a paramater consisting your database connection. so we'll just assume that you already have a database connection similar below.

To call the OctaPDO, simply pass your database connection on the OctaPDO class like the below example

OctaPDO Active Record Documentation

$db->get();
Runs the selection query and returns the result. Can be used by itself to retrieve all records from a table

The second and third parameters enable you to set a limit and offset clause:

You'll notice that the above function is assigned to a variable named $query, which can be used to show the results:


$db->select();
Permits you to write the SELECT portion of your query:

$db->select() accepts an optional second parameter. If you set it to FALSE, OctaPDO will not try to protect your field or table names with backticks. This is useful if you need a compound select statement.


$db->join();
Permits you to write the JOIN portion of your query:

Multiple function calls can be made if you need several joins in one query.
If you need a specific type of JOIN you can specify it via the third parameter of the function. Options are: left, right, outer, inner, left outer, and right outer.


$db->where();
This function enables you to set WHERE clauses using one of four methods:

$db->where()
accepts an optional third parameter. If you set it to FALSE, OctaPDO will not try to protect your field or table names with backticks.

$db->or_where();
This function is identical to the one above, except that multiple instances are joined by OR:


$db->where_in();
Generates a WHERE field IN ('item', 'item') SQL query joined with AND if appropriate


$db->or_where_in();
Generates a WHERE field IN ('item', 'item') SQL query joined with OR if appropriate


$db->where_not_in();
Generates a WHERE field NOT IN ('item', 'item') SQL query joined with AND if appropriate


$db->or_where_not_in();
Generates a WHERE field NOT IN ('item', 'item') SQL query joined with OR if appropriate


$db->like();
This function enables you to generate LIKE clauses, useful for doing searches.

If you use multiple function calls they will be chained together with AND between them:

If you want to control where the wildcard (%) is placed, you can use an optional third argument. Your options are 'before', 'after' and 'both' (which is the default).

If you do not want to use the wildcard (%) you can pass to the optional third argument the option 'none'.


$db->or_like();
This function is identical to the one above, except that multiple instances are joined by OR:

$db->not_like();
This function is identical to like(), except that it generates NOT LIKE statements:


$db->or_not_like();
This function is identical to not_like(), except that multiple instances are joined by OR:


$db->group_by();
Permits you to write the GROUP BY portion of your query:

You can also pass an array of multiple values as well:


$db->order_by();
Lets you set an ORDER BY clause. The first parameter contains the name of the column you would like to order by. The second parameter lets you set the direction of the result. Options are asc or desc, or random.

You can also pass your own string in the first parameter:

Or multiple function calls can be made if you need multiple fields.


$db->insert();
Generates an insert string based on the data you supply, and runs the query. You can either pass an array or an object to the function. Here is an example using an array:

The first parameter will contain the table name, the second is an associative array of values. Here is an example using an object:

The first parameter will contain the table name, the second is an object.

$db->update();
Generates an update string and runs the query based on the data you supply. You can pass an array or an object to the function. Here is an example using an array:

Or you can supply an object:

You'll notice the use of the $db->where() function, enabling you to set the WHERE clause. You can optionally pass this information directly into the update function as a string:

Or as an array:

You may also use the $db->set() function described above when performing updates.

$db->delete();
Generates a delete SQL string and runs the query.

The first parameter is the table name, the second is the where clause. You can also use the where() or or_where() functions instead of passing the data to the second parameter of the function:

An array of table names can be passed into delete() if you would like to delete data from more than 1 table.

If you want to delete all data from a table, you can use the truncate() function, or empty_table().

Example Of Queries Using OctaPDO Active Record


LIST OF PRE-DEFINED CLASS

License

License

Acknowledgments

Support

Reach me out on this social media site.
Linkedin.com


All versions of octa-pdo with dependencies

PHP Build Version
Package Version
No informations.
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 octa-php/octa-pdo contains the following files

Loading the files please wait ....