Sha256: e43fb6bea61079fe250f62fbc05ddb6349aea2ae86a0f40c083ff1d45925442b

Contents?: true

Size: 974 Bytes

Versions: 12

Compression:

Stored size: 974 Bytes

Contents

<?php
  require_once("def.inc");
  require_once("mod/database.inc");
  require_once("collections.inc");

	function getfiles( $dir )
	{
	$tree = array();

	if( $handle = opendir( $dir ) )
	{
		$i = 0;
		while ( false !== $file = readdir( $handle ) )
		{
			if( $file != "." && $file != ".." )
			{
					$tree[$i] = $file;
					$i++;
			}
		}
		closedir( $handle );
		uasort( $tree, "strcmp" ); 
	}
	return $tree;
	}

  function dosql($trans) {
		$context = NULL;

		if($trans)
		{
    	$file = "SQLlist/".$trans;
			if(is_file($file))
			{
    		$context=file_get_contents($file);
			}
		}

		if(!$context)
		{
			$files =  getfiles("SQLlist");
			$files_num = count($files) -1;
      $num = rand(0,$files_num);
    	$context=file_get_contents("SQLlist/".$files[$num]);						
		}
		$sqlarray = explode(";",$context);
    $con = dbconnect();

		for($i = 0; $i<count($sqlarray) -1;  $i++)
		{
			$sql = $sqlarray[$i];
			echo $sql."<BR>";
    	trans_end($con,$sql);
		}
  }
?>

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
prestogres-0.4.8 pgpool2/test/pdo-test/regsql.inc
prestogres-0.4.7 pgpool2/test/pdo-test/regsql.inc
prestogres-0.4.6 pgpool2/test/pdo-test/regsql.inc
prestogres-0.4.5 pgpool2/test/pdo-test/regsql.inc
prestogres-0.4.4 pgpool2/test/pdo-test/regsql.inc
prestogres-0.4.3 pgpool2/test/pdo-test/regsql.inc
prestogres-0.4.2 pgpool2/test/pdo-test/regsql.inc
prestogres-0.4.1 pgpool2/test/pdo-test/regsql.inc
prestogres-0.4.0 pgpool2/test/pdo-test/regsql.inc
prestogres-0.3.0 pgpool2/test/pdo-test/regsql.inc
prestogres-0.2.0 pgpool2/test/pdo-test/regsql.inc
prestogres-0.1.0 pgpool2/test/pdo-test/regsql.inc