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

version» Context lines:

Roxen.git/server/modules/tags/sqltag.pike:1:   /* -  * $Id: sqltag.pike,v 1.37 1999/09/28 15:46:51 mast Exp $ +  * $Id: sqltag.pike,v 1.38 1999/10/11 11:41:02 grubba Exp $    *    * A module for Roxen Challenger, which gives the tags    * <SQLQUERY> and <SQLOUTPUT>.    *    * Henrik Grubbström 1997-01-12    */    - constant cvs_version="$Id: sqltag.pike,v 1.37 1999/09/28 15:46:51 mast Exp $"; + constant cvs_version="$Id: sqltag.pike,v 1.38 1999/10/11 11:41:02 grubba Exp $";   constant thread_safe=1;   #include <module.h>      /* Compatibility with old versions of the sqltag module. */   // #define SQL_TAG_COMPAT      inherit "module";   inherit "roxenlib";      import Array;
Roxen.git/server/modules/tags/sqltag.pike:163:    args->query, describe_backtrace(error)));    }    res = ("<h3>Query \"" + html_encode_string(args->query)    + "\" failed: " + html_encode_string(con->error())    + "</h1>\n<false>");    } else {    res = "<false>";    }    } else if (result && sizeof(result))    { +  if(args["mysql-insert-id"]) +  if(con->master_sql->insert_id) +  request_id->variables[args["mysql-insert-id"]] = +  (string)con->master_sql->insert_id(); +  else +  return "<!-- No insert_id present. --><false>"; +     res = ({do_output_tag( args, result, contents, request_id )});    request_id->misc->defines[" _ok"] = 1; // The effect of <true>, since res isn't parsed.       if( args["rowinfo"] )    request_id->variables[args->rowinfo]=sizeof(result);       } else {    res = "<false>";    }    } else {
Roxen.git/server/modules/tags/sqltag.pike:255:    "%s\n",    args->query, describe_backtrace(error)));    }    return("<h3>Query \"" + html_encode_string(args->query)+"\" failed: "    + html_encode_string(con->error()) + "</h1>\n<false>");    } else {    return("<false>");    }    }    if(args["mysql-insert-id"]) -  if(con->master_sql) +  if(con->master_sql->insert_id)    request_id->variables[args["mysql-insert-id"]] = -  con->master_sql->insert_id(); +  (string)con->master_sql->insert_id();    else    return "<!-- No insert_id present. --><false>";    return("<true>");    } else {    return("<!-- No query! --><false>");    }   }      string sqltable_tag(string tag_name, mapping args,    object request_id, object f,