PHP Classes

File: examples/tbs_us_examples_datamysql.php

Recommend this page to a friend!
  Classes of Skrol29   TinyButStrong template engine   examples/tbs_us_examples_datamysql.php   Download  
File: examples/tbs_us_examples_datamysql.php
Role: Example script
Content type: text/plain
Description: examples and tests - mysql
Class: TinyButStrong template engine
Template Engine for Pro and Beginners
Author: By
Last change: goes with last TBS version
Date: 5 years ago
Size: 540 bytes


Class file image Download


//Connexion to the database
/* Use the example below.
$cnx_id = mysql_connect('localhost','user','password');
$sql_ok = ( isset($cnx_id) && is_resource($cnx_id) ) ? 1 : 0;
if (
$sql_ok==0) $cnx_id = 'clear'; // makes the block to be cleared instead of merged with an SQL query.

$TBS = new clsTinyButStrong;

$TBS->MergeBlock('blk1',$cnx_id,'SELECT * FROM t_tbs_exemples');