PHP Classes

File: prepared_statements2.php

Recommend this page to a friend!
  Classes of Fernando Costa(14biss)   SPMD   prepared_statements2.php   Download  
File: prepared_statements2.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: 13 years ago
Size: 585 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";');
$Query = $Con->prepare('
    INSERT INTO CronJobTasks
        (scriptToExecute,lastExec,lastExecStatus,breakExec,TotalExecutions,IsRun)
    VALUES
        (:Script,:LastExec,:LastExecStatus,:breakExec,:TotalExec,:Run)'
,
    array(
       
':Script' => 'generateUsersOnline',
       
':LastExec' => '0',
       
':LastExecStatus' => '1',
       
':breakExec' => '60',
       
':TotalExec' => '0',
       
':Run' => '1',
    ));
$Con->execute();