Roxen.git / server / modules / tags / sqltag.pike

version» Context lines:

Roxen.git/server/modules/tags/sqltag.pike:1:   /* -  * $Id: sqltag.pike,v 1.39 1999/11/05 08:46:55 nilsson Exp $ +  * $Id: sqltag.pike,v 1.40 1999/11/23 14:19:35 grubba Exp $    *    * A module for Roxen Challenger, which gives the tags    * <sqltable>, <sqlquery> and <sqloutput>.    *    * Henrik Grubbström 1997-01-12    */    - constant cvs_version="$Id: sqltag.pike,v 1.39 1999/11/05 08:46:55 nilsson Exp $"; + constant cvs_version="$Id: sqltag.pike,v 1.40 1999/11/23 14:19:35 grubba Exp $";   constant thread_safe=1;   #include <module.h>   #define old_rxml_compat 1      // Compatibility with old versions of the sqltag module.   // #define SQL_TAG_COMPAT      inherit "module";   inherit "roxenlib";   
Roxen.git/server/modules/tags/sqltag.pike:146:    report_error(sprintf("SQLTAG: Couldn't connect to SQL server:\n"    "%s\n", describe_backtrace(error)));    }    return "<h3>Couldn't connect to SQL server</h3><br>\n" +    html_encode_string(error[0]) + "<false>";    }    return rxml_error(tag, "Couldn't connect to SQL server. "+html_encode_string(error[0]), id);    }       if (error = catch(result = tag=="sqltable"?con->big_query(args->query):con->query(args->query))) { -  error = html_encode_string(sprintf("Query %O failed. %s", args->query, con->error())); +  error = html_encode_string(sprintf("Query %O failed. %s", args->query, +  con->error()||""));    if (!args->quiet) {    if (args->log_error && QUERY(log_error)) {    report_error(sprintf("SQLTAG: Query %O failed:\n"    "%s\n",    args->query, describe_backtrace(error)));    }    return "<h3>"+error+"</h3>\n<false>";    }    return rxml_error(tag, error, id);    }