1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>SAMURAI: Samurai_DB.php Source File</title>
4 <link href="doxygen.css" rel="stylesheet" type="text/css">
6 <!-- Generado por Doxygen 1.3.2 -->
7 <div class="qindex"><a class="qindex" href="main.html">Página principal</a> | <a class="qindex" href="classes.html">Lista alfabética</a> | <a class="qindex" href="annotated.html">Lista de componentes</a> | <a class="qindex" href="files.html">Lista de archivos</a> | <a class="qindex" href="functions.html">Miembros de las clases</a></div>
8 <h1>Samurai_DB.php</h1><a href="Samurai__DB_8php.html">Ir a la documentación de este archivo.</a><div class="fragment"><pre>00001 <?php
9 00002 <span class="comment">// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:</span>
10 00003 <span class="comment">// +----------------------------------------------------------------------+</span>
11 00004 <span class="comment">// | PHP Version 4 |</span>
12 00005 <span class="comment">// +----------------------------------------------------------------------+</span>
13 00006 <span class="comment">// | Copyright (c) 1997-2003 The PHP Group |</span>
14 00007 <span class="comment">// +----------------------------------------------------------------------+</span>
15 00008 <span class="comment">// | This source file is subject to version 2.02 of the PHP license, |</span>
16 00009 <span class="comment">// | that is bundled with this package in the file LICENSE, and is |</span>
17 00010 <span class="comment">// | available at through the world-wide-web at |</span>
18 00011 <span class="comment">// | http://www.php.net/license/2_02.txt. |</span>
19 00012 <span class="comment">// | If you did not receive a copy of the PHP license and are unable to |</span>
20 00013 <span class="comment">// | obtain it through the world-wide-web, please send a note to |</span>
21 00014 <span class="comment">// | license@php.net so we can mail you a copy immediately. |</span>
22 00015 <span class="comment">// +----------------------------------------------------------------------+</span>
23 00016 <span class="comment">// | Created: Tue May 27 12:16:12 2003</span>
24 00017 <span class="comment">// | Author: Martin Marrese - Myrna Degano <mmarre@mecon.gov.ar - mdegan@mecon.gov.ar></span>
25 00018 <span class="comment">// +----------------------------------------------------------------------+</span>
26 00019 <span class="comment">//</span>
27 00020 <span class="comment">// $Id: Samurai_DB.php 26 2003-07-07 22:45:35Z mmarre $</span>
28 00021 <span class="comment">// $Author: mmarre $</span>
29 00022 <span class="comment">// $URL: http://portal.mecon.ar/svn/samurai/tronco/lib/SAMURAI/Samurai_DB.php $</span>
30 00023 <span class="comment">// $Date: 2003-07-07 19:45:35 -0300 (Mon, 07 Jul 2003) $</span>
31 00024 <span class="comment">// $Rev: 26 $</span>
32 00025 <span class="comment">//</span>
34 00027 <span class="preprocessor">#require_once 'PEAR.php';</span>
35 00028 <span class="preprocessor"></span>
37 00030 <span class="comment">// +X2C includes</span>
38 00031 require_once 'DB.php';
39 00032 <span class="comment">// ~X2C</span>
41 00034 <span class="comment">// +X2C Class 265 :Samurai_DB</span>
42 <a name="l00040"></a><a class="code" href="classSamurai__DB2.html">00040</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="classSamurai__DB2.html">Samurai_DB2</a> <span class="keyword">extends</span> DB {
43 00041 <span class="comment">// ~X2C</span>
45 00043 <span class="comment">// +X2C Operation 269</span>
46 <a name="l00050"></a><a class="code" href="classSamurai__DB2.html#a0">00050</a> <span class="comment"></span> function <a class="code" href="classSamurai__DB2.html#a0">connect</a>() <span class="comment">// ~X2C</span>
48 00052 $conf = include 'conf/confSecciones.php';
50 00054 $dsn = $conf['db_type'].':<span class="comment">//'.$conf['db_user'].':'.$conf['db_pass'].'@'.$conf['db_host'].'/'.$conf['db_name'];</span>
52 00056 $db = DB::connect($dsn,<span class="keyword">true</span>);
53 00057 <span class="keywordflow">if</span> (DB::isError($db)) {
54 00058 die ($db->getMessage());
56 00060 <span class="keywordflow">return</span> $db;
58 00062 <span class="comment">// -X2C</span>
60 00064 } <span class="comment">// -X2C Class :Samurai_DB</span>
63 </pre></div><hr size="1"><address style="align: right;"><small>Generado el Tue Jul 8 11:36:21 2003 para SAMURAI por
64 <a href="http://www.doxygen.org/index.html">
65 <img src="doxygen.png" alt="doxygen" align="middle" border=0 >
66 </a>1.3.2 </small></address>