Login   Register  
PHP Classes
elePHPant
Icontem

File: prepared_statements1.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Fernando Costa(14biss)  >  SPMD  >  prepared_statements1.php  >  Download  
File: prepared_statements1.php
Role: Example script
Content type: text/plain
Description: Using Prepared Statements
Class: SPMD
Wrapper to access different types of databases
Author: By
Last change:
Date: 2 years ago
Size: 601 bytes
 

Contents

Class file image Download
<?php
require 'SPMD.class.php';

$Con = new SPMD('mssql:host="127.0.0.1"; user="sa"; pass="123456"; database="Cronjob";');
$Con->bindValue(':Script','generateUsersOnline');
$Con->bindValue(':LastExec','0');
$Con->bindValue(':LastExecStatus','1');
$Con->bindValue(':breakExec','60');
$Con->bindValue(':TotalExec','0');
$Con->bindValue(':Run','0');
$Query $Con->prepare('
    INSERT INTO CronJobTasks
        (scriptToExecute,lastExec,lastExecStatus,breakExec,TotalExecutions,IsRun)
    VALUES
        (:Script,:LastExec,:LastExecStatus,:breakExec,:TotalExec,:Run)'
);
$Con->execute();