2017 © Pedro Peláez
 

library cli-db-iterator

Interface for iterating through a SQL selection

image

leocolomb/cli-db-iterator

Interface for iterating through a SQL selection

  • Monday, February 19, 2018
  • by LeoColomb
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

CLI Database Iterator

Interface for iterating through a SQL selection, (*1)

Usage

$ composer require leocolomb/cli-db-iterator

Example

require_once __DIR__ . '/vendor/autoload.php';

use CLIDatabaseIterator\Iterator;

$bridge = new Iterator("SELECT `ID`, `content` FROM `data`;");

while ($row = $bridge->fetch()) {
    $bridge->query("UPDATE `data` SET `content`='new content' WHERE `ID`={$row['ID']};", true);
    $bridge->alert("Updated!", $row['ID']);
}

$bridge->finish();

See wordpress-thumbnails for a real example., (*2)

License

ISC © Léo Colombaro, (*3)

The Versions

19/02 2018

dev-master

9999999-dev https://github.com/LeoColomb/cli-db-iterator

Interface for iterating through a SQL selection

  Sources   Download

ISC

The Requires

 

The Development Requires

database cli

19/02 2018

v1.0.0

1.0.0.0 https://github.com/LeoColomb/cli-db-iterator

Interface for iterating through a SQL selection

  Sources   Download

ISC

The Requires

 

database cli