pike.git / lib / modules / Sql.pmod / mysql.pike

version» Context lines:

pike.git/lib/modules/Sql.pmod/mysql.pike:1:   /* -  * $Id: mysql.pike,v 1.5 1998/07/03 20:03:49 mast Exp $ +  * $Id: mysql.pike,v 1.6 1998/10/17 03:05:49 grubba Exp $    *    * Glue for the Mysql-module    */      //.   //. File: mysql.pike - //. RCSID: $Id: mysql.pike,v 1.5 1998/07/03 20:03:49 mast Exp $ + //. RCSID: $Id: mysql.pike,v 1.6 1998/10/17 03:05:49 grubba Exp $   //. Author: Henrik Grubbström (grubba@idonex.se)   //.   //. Synopsis: Implements the glue to the Mysql-module.   //.   //. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++   //.   //. Implements the glue needed to access the Mysql-module from the generic   //. SQL module.   //.    -  + #if constant(Mysql.mysql) +    inherit Mysql.mysql;      //. - quote   //. Quote a string so that it can safely be put in a query.   //. > s - String to quote.   string quote(string s)   {    return(replace(s,    ({ "\\", "\"", "\0", "\'", "\n", "\r" }),    ({ "\\\\", "\\\"", "\\0", "\\\'", "\\n", "\\r" })));
pike.git/lib/modules/Sql.pmod/mysql.pike:118:    if (sizeof (a) == 2)    return decode_date (a[0]) + decode_time (a[1]);    else {    int n = sizeof (timestr);    if (n >= 12)    return decode_date (timestr[..n-7]) + decode_time (timestr[n-6..n-1]);    else    return decode_date (timestr);    }   } +  + #else /* !constant(Mysql.mysql) */ + void create() + { +  destruct(); + } + #endif /* constant(Mysql.mysql) */