]> git.llucax.com Git - mecon/samurai.git/blob - doc/apidoc/html/Samurai__DB_8php-source.html
Arreglo para que funcione con la nueva version de Marco
[mecon/samurai.git] / doc / apidoc / html / Samurai__DB_8php-source.html
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">
5 </head><body>
6 <!-- Generado por Doxygen 1.3.2 -->
7 <div class="qindex"><a class="qindex" href="main.html">Página&nbsp;principal</a> | <a class="qindex" href="classes.html">Lista&nbsp;alfabética</a> | <a class="qindex" href="annotated.html">Lista&nbsp;de&nbsp;componentes</a> | <a class="qindex" href="files.html">Lista&nbsp;de&nbsp;archivos</a> | <a class="qindex" href="functions.html">Miembros&nbsp;de&nbsp;las&nbsp;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 &lt;?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 &lt;mmarre@mecon.gov.ar - mdegan@mecon.gov.ar&gt;</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>
33 00026 
34 00027 <span class="preprocessor">#require_once 'PEAR.php';</span>
35 00028 <span class="preprocessor"></span>
36 00029 
37 00030 <span class="comment">// +X2C includes</span>
38 00031 require_once 'DB.php';
39 00032 <span class="comment">// ~X2C</span>
40 00033 
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>
44 00042 
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>
47 00051     {
48 00052         $conf = include 'conf/confSecciones.php';
49 00053 
50 00054         $dsn = $conf['db_type'].':<span class="comment">//'.$conf['db_user'].':'.$conf['db_pass'].'@'.$conf['db_host'].'/'.$conf['db_name'];</span>
51 00055 
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-&gt;getMessage());
55 00059         }
56 00060         <span class="keywordflow">return</span> $db;
57 00061     }
58 00062     <span class="comment">// -X2C</span>
59 00063 
60 00064 } <span class="comment">// -X2C Class :Samurai_DB</span>
61 00065 
62 00066 ?&gt;
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>
67 </body>
68 </html>