~ubuntu-branches/ubuntu/jaunty/moodle/jaunty

« back to all changes in this revision

Viewing changes to lib/adodb/drivers/adodb-mssql_n.inc.php

  • Committer: Bazaar Package Importer
  • Author(s): Jordan Mantha, Matt Oquist
  • Date: 2009-02-25 15:16:22 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090225151622-0ekt1liwhv2obfza
Tags: 1.9.4.dfsg-0ubuntu1
* Merge with Debian git (Closes LP: #322961, #239481, #334611):
  - use Ubuntu's smarty lib directory for linking
  - use internal yui library 
  - add update-notifier support back in

[Matt Oquist]
  * renamed prerm script
  * significantly rewrote postinst and other maintainer scripts to improve
    user experience and package maintainability
    (Closes LP: #225662, #325450, #327843, #303078, #234609)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php  /// $Id $
 
1
<?php
 
2
 
 
3
/// $Id $
2
4
 
3
5
///////////////////////////////////////////////////////////////////////////
4
6
//                                                                       //
7
9
// ADOdb  - Database Abstraction Library for PHP                         //
8
10
//          http://adodb.sourceforge.net/                                //
9
11
//                                                                       //
10
 
// Copyright (C) 2000-2006 John Lim (jlim\@natsoft.com.my)               //
 
12
// Copyright (C) 2000-2008 John Lim (jlim\@natsoft.com.my)               //
11
13
//          All rights reserved.                                         //
12
14
//          Released under both BSD license and LGPL library license.    //
13
15
//          Whenever there is any discrepancy between the two licenses,  //
69
71
     * the "N" notation when working against MSSQL.
70
72
     *
71
73
     * Note that this hack only must be used if ALL the char-based columns in your DB are of type nchar,
72
 
     * nvarchar and ntext 
 
74
     * nvarchar and ntext
73
75
     */
74
76
    function _appendN($sql) {
75
77
 
125
127
            }
126
128
        }
127
129
 
 
130
 
128
131
    /// Analyse literals to prepend the N char to them if their contents aren't numeric
129
132
        if (!empty($literals)) {
130
133
            foreach ($literals as $key=>$value) {
140
143
            $result = str_replace(array_keys($literals), $literals, $result);
141
144
        }
142
145
 
 
146
    /// Any pairs followed by N' must be switched to N' followed by those pairs
 
147
    /// (or strings beginning with single quotes will fail)
 
148
        $result = preg_replace("/((<@#@#@PAIR-(\d+)@#@#@>)+)N'/", "N'$1", $result);
 
149
 
143
150
    /// Re-apply pairs of single-quotes to the text
144
151
        if (!empty($pairs)) {
145
152
            $result = str_replace(array_keys($pairs), $pairs, $result);
161
168
                $this->ADORecordset_mssql($id,$mode);
162
169
        }
163
170
}
164
 
?>
 
171
?>
 
 
b'\\ No newline at end of file'