惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The GitHub Blog
The GitHub Blog
Microsoft Azure Blog
Microsoft Azure Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
Vulnerabilities – Threatpost
人人都是产品经理
人人都是产品经理
小众软件
小众软件
O
OpenAI News
量子位
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cyber Attacks, Cyber Crime and Cyber Security
N
Netflix TechBlog - Medium
J
Java Code Geeks
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
I
InfoQ
V
Visual Studio Blog
C
Cisco Blogs
T
Threat Research - Cisco Blogs
K
Kaspersky official blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Scott Helme
Scott Helme
大猫的无限游戏
大猫的无限游戏
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
The Exploit Database - CXSecurity.com
Y
Y Combinator Blog
宝玉的分享
宝玉的分享
酷 壳 – CoolShell
酷 壳 – CoolShell
T
The Blog of Author Tim Ferriss
T
Tor Project blog
Spread Privacy
Spread Privacy
T
Threatpost
S
Schneier on Security
A
Arctic Wolf
The Cloudflare Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
CXSECURITY Database RSS Feed - CXSecurity.com
Simon Willison's Weblog
Simon Willison's Weblog
Apple Machine Learning Research
Apple Machine Learning Research
D
DataBreaches.Net
D
Docker
G
GRAHAM CLULEY
S
Securelist
P
Palo Alto Networks Blog
阮一峰的网络日志
阮一峰的网络日志
L
LINUX DO - 热门话题
P
Privacy International News Feed

博客园 - 秋衫客

多久没来过这里了 发现上一篇日志是在两年前 终于要离开了,感觉有点那个吧 Visual C#.Net 网络程序开发-Socket篇 用C#下的Raw Socket编程实现网络封包监视 debian安装详细过程 MUTT文档中的Configuration variables 据说只有山东人才能看懂的笑话 转的一篇有用的装LAMP的文章 回应bobicqx朋友的留言 转:近视手术的黑幕!!!"医生"的良心何在???...... 为公司一个项目写的一个数据库操作类,使用了SQL Relay 今天刚知道的Javascript中parseInt函数的另一个参数 PHP的数据库连接池的实现 寒冷是有味道的 我侄女生病了,着急,担心 刚刚写了个小程序,显示系统中正在运行的进程及进程中模块的 QQ的HTTP接口探究 无意中发现的一个很不错的QQWry.dat文件格式的原理
SQL Relay的PHP API使用方法
秋衫客 · 2006-01-19 · via 博客园 - 秋衫客
  • int sqlrcon_alloc(string server, int port, string socket, string user, string password, int retrytime, int tries)

    Initiates a connection to "server" on "port" or to the unix "socket" on the local machine and authenticates with "user" and "password". Failed connections will be retried for "tries" times on interval "retrytime". If "tries" is 0 then retries will continue forever. If "retrytime" is 0 then retries will be attempted on a default interval.

    If the "socket" parameter is nether NULL nor "" then an attempt will be made to connect through it before attempting to connect to "server" on "port". If it is NULL or "" then no attempt will be made to connect through the socket.*/

  • void sqlrcon_free(int sqlrconref)

    Disconnects and terminates the session if it hasn't been terminated already.

  • void sqlrcon_endSession(int sqlrconref)

    terminates the session

  • void sqlrcon_suspendSession(int sqlrconref)

    Disconnects this client from the current session but leaves the session open so that another client can connect to it using sqlrcon_resumeSession().

  • int sqlrcon_getConnectionPort(int sqlrconref)

    Returns the inet port that the client is communicating over. This parameter may be passed to another client for use in the sqlrcon_resumeSession() command.

  • string sqlrcon_getConnectionSocket(int sqlrconref)

    Returns the unix socket that the client is communicating over. This parameter may be passed to another client for use in the sqlrcon_resumeSession() command.

  • int sqlrcon_resumeSession(int sqlrconref, int port, string socket)

    Resumes a session previously left open using sqlrcon_suspendSession(). Returns 1 on success and 0 on failure.

  • int sqlrcon_ping(int sqlrconref)

    Returns 1 if the database is up and 0 if it's down.

  • string sqlrcon_identify(int sqlrconref)

    Returns the type of database: oracle7, oracle8, postgresql, mysql, etc.

  • int sqlrcon_autoCommitOn(int sqlrconref)

    Instructs the database to perform a commit after every successful query.

  • int sqlrcon_autoCommitOff(int sqlrconref)

    Instructs the database to wait for the client to tell it when to commit.

  • int sqlrcon_commit(int sqlrconref)

    Issues a commit. Returns 1 if the commit succeeded, 0 if it failed and -1 if an error occurred.

  • int sqlrcon_rollback(int sqlrconref)

    Issues a rollback. Returns 1 if the rollback succeeded, 0 if it failed and -1 if an error occurred.

  • void sqlrcon_debugOn(int sqlrconref)

    Causes verbose debugging information to be sent to standard output. Another way to do this is to start a query with "-- debug\n".

  • void sqlrcon_debugOff(int sqlrconref)

    turns debugging off

  • int sqlrcon_getDebug(int sqlrconref)

    returns FALSE if debugging is off and TRUE if debugging is on

  • int sqlrcur_alloc(int sqlrconref)
  • void sqlrcur_free(int sqlrcur)
  • void sqlrcur_setResultSetBufferSize(int sqlrcurref, int rows)

    Sets the number of rows of the result set to buffer at a time. 0 (the default) means buffer the entire result set.

  • int sqlrcur_getResultSetBufferSize(int sqlrcurref)

    Returns the number of result set rows that will be buffered at a time or 0 for the entire result set.

  • void sqlrcur_dontGetColumnInfo(int sqlrcurref)

    Tells the server not to send any column info (names, types, sizes). If you don't need that info, you should call this method to improve performance.

  • void sqlrcur_mixedCaseColumnNames(int sqlrcurref)

    Columns names are returned in the same case as they are defined in the database. This is the default.

  • void sqlrcur_upperCaseColumnNames(int sqlrcurref)

    Columns names are converted to upper case.

  • void sqlrcur_lowerCaseColumnNames(int sqlrcurref)

    Columns names are converted to lower case.

  • void sqlrcur_getColumnInfo(int sqlrcurref)

    Tells the server to send column info.

  • void sqlrcur_cacheToFile(int sqlrcurref, string filename)

    Sets query caching on. Future queries will be cached to the file "filename". A default time-to-live of 10 minutes is also set. Note that once sqlrcur_cacheToFile() is called, the result sets of all future queries will be cached to that file until another call to sqlrcur_cacheToFile() changes which file to cache to or a call to sqlrcur_cacheOff() turns off caching.

  • void sqlrcur_setCacheTtl(int sqlrcurref, int ttl)

    Sets the time-to-live for cached result sets. The sqlr-cachemanger will remove each cached result set "ttl" seconds after it's created.

  • string sqlrcur_getCacheFileName(int sqlrcurref)

    Returns the name of the file containing the most recently cached result set.

  • void sqlrcur_cacheOff(int sqlrcurref)

    Sets query caching off.

  • If you don't need to use substitution or bind variables in your queries, use these two methods.

    If you need to use substitution or bind variables, in your queries use the following methods. See the API documentation for more information about substitution and bind variables.

  • void sqlrcur_prepareQuery(int sqlrcurref, string query)

    Prepare to execute "query".

  • void sqlrcur_prepareQueryWithLength(int sqlrcurref, string query, int length)

    Prepare to execute "query" with length "length". This method must be used if the query contains binary data.

  • void sqlrcur_prepareFileQuery(int sqlrcurref, string path, string filename)

    Prepare to execute the contents of "path"/"filename".

  • void sqlrcur_substitution(int sqlrcurref, string variable, string value)
    void sqlrcur_substitution(int sqlrcurref, string variable, long value)
    void sqlrcur_substitution(int sqlrcurref, string variable, double value, short precision, short scale)

    Define a substitution variable.

  • void sqlrcur_clearBinds(int sqlrcurref)

    Clear all bind variables.

  • void sqlrcur_countBindVariables(int sqlrcurref)

    Parses the previously prepared query, counts the number of bind variables defined in it and returns that number.

  • void sqlrcur_inputBind(int sqlrcurref, string variable, string value)
    void sqlrcur_inputBind(int sqlrcurref, string variable, long value)
    void sqlrcur_inputBind(int sqlrcurref, string variable, double value, short precision, short scale)
    void sqlrcur_inputBindBlob(int sqlrcurref, string variable, long length)
    void sqlrcur_inputBindClob(int sqlrcurref, string variable, long length)

    Define an input bind variable.

  • void sqlrcur_defineOutputBind(int sqlrcurref, string variable, int length)

    Define an output bind variable. "length" bytes will be reserved to store the value.

  • void sqlrcur_defineOutputBindBlob(int sqlrcurref, string variable)

    Define a BLOB output bind variable.

  • void sqlrcur_defineOutputBindClob(int sqlrcurref, string variable)

    Define a CLOB output bind variable.

  • void sqlrcur_defineOutputBindCursor(int sqlrcurref, string variable)

    Define a cursor output bind variable.

  • void sqlrcur_validateBinds(int sqlrcurref)

    If you are binding to any variables that might not actually be in your query, call this to ensure that the database won't try to bind them unless they really are in the query.

  • int sqlrcur_executeQuery(int sqlrcurref)

    Execute the query that was previously prepared and bound.

  • int sqlrcur_fetchFromBindCursor(int sqlrcurref)

    Fetch from a cursor that was returned as an output bind variable.

    int sqlrcur_getOutputBind(int sqlrcurref, string variable)

    Get the value stored in a previously defined output bind variable.

  • int sqlrcur_getOutputBindLength(int sqlrcurref, string variable)

    Get the length of the value stored in a previously defined output bind variable.

  • int sqlrcur_getOutputBindCursor(int sqlrcurref, string variable)

    Get the cursor associated with a previously defined output bind variable.

  • int sqlrcur_openCachedResultSet(int sqlrcurref, string filename)

    Opens a cached result set as if a query that would have generated it had been executed. Returns TRUE on success and FALSE on failure.

  • int sqlrcur_colCount(int sqlrcurref)

    returns the number of columns in the current return set

  • int sqlrcur_rowCount(int sqlrcurref)

    returns the number of rows in the current return set

  • int sqlrcur_totalRows(int sqlrcurref)

    Returns the total number of rows that will be returned in the result set. Not all databases support this call. Don't use it for applications which are designed to be portable across databases. -1 is returned by databases which don't support this option.

  • int sqlrcur_affectedRows(int sqlrcurref)

    Returns the number of rows that were updated, inserted or deleted by the query. Not all databases support this call. Don't use it for applications which are designed to be portable across databases. -1 is returned by databases which don't support this option.

  • int sqlrcur_firstRowIndex(int sqlrcurref)

    Returns the index of the first buffered row. This is useful when buffering only part of the result set at a time.

  • int sqlrcur_endOfResultSet(int sqlrcurref)

    Returns 0 if part of the result set is still pending on the server and 1 if not. This method can only return 0 if setResultSetBufferSize() has been called with a parameter other than 0.

  • string sqlrcur_errorMessage(int sqlrcurref)

    If a query failed and generated an error, the error message is available here. If the query succeeded then this method returns FALSE

  • string sqlrcur_getNullsAsEmptyStrings(int sqlrcurref)

    Tells the client to return NULL fields and output bind variables as empty strings. This is the default.

  • string sqlrcur_getNullsAsNulls(int sqlrcurref)

    Tells the client to return NULL fields and output bind variables as NULL's.

  • string sqlrcur_getField(int sqlrcurref, int row, int col)

    returns a string with value of the specified row and column

  • string sqlrcur_getFieldLength(int sqlrcurref, int row, int col)

    returns the length of the specified row and column

  • array sqlrcur_getRow(int sqlrcurref, int row)

    returns an indexed array of the values of the specified row

  • array sqlrcur_getRowLengths(int sqlrcurref, int row)

    returns an indexed array of the lengths of the specified row

  • array sqlrcur_getRowAssoc(int sqlrcurref, int row)

    returns an associative array of the values of the specified row

  • array sqlrcur_getRowLengthsAssoc(int sqlrcurref, int row)

    returns an associative array of the lengths of the specified row

  • array sqlrcur_getColumnNames(int sqlrcurref)

    returns the array of the column names of the current return set

  • string sqlrcur_getColumnName(int sqlrcurref, int col)

    returns the name of the specified column

  • string sqlrcur_getColumnType(int sqlrcurref, string col)
    string sqlrcur_getColumnType(int sqlrcurref, int col)

    returns the type of the specified column

  • int sqlrcur_getColumnLength(int sqlrcurref, string col)
    int sqlrcur_getColumnLength(int sqlrcurref, int col)

    returns the length of the specified column.

  • int sqlrcur_getColumnPrecision(int sqlrcurref, string col);
    int sqlrcur_getColumnPrecision(int sqlrcurref, int col);

    Returns the precision of the specified column. Precision is the total number of digits in a number. eg: 123.45 has a precision of 5. For non-numeric types, it's the number of characters in the string.

  • int sqlrcur_getColumnScale(int sqlrcurref, string col);
    int sqlrcur_getColumnScale(int sqlrcurref, int col);

    Returns the scale of the specified column. Scale is the total number of digits to the right of the decimal point in a number. eg: 123.45 has a scale of 2.

  • int sqlrcur_getColumnIsNullable(int sqlrcurref, string col);
    int sqlrcur_getColumnIsNullable(int sqlrcurref, int col);

    Returns 1 if the specified column can contain nulls and 0 otherwise.

  • int sqlrcur_getColumnIsPrimaryKey(int sqlrcurref, string col);
    int sqlrcur_getColumnIsPrimaryKey(int sqlrcurref, int col);

    Returns 1 if the specified column is a primary key and 0 otherwise.

  • int sqlrcur_getColumnIsUnique(int sqlrcurref, string col);
    int sqlrcur_getColumnIsUnique(int sqlrcurref, int col);

    Returns 1 if the specified column is unique and 0 otherwise.

  • int sqlrcur_getColumnIsPartOfKey(int sqlrcurref, string col);
    int sqlrcur_getColumnIsPartOfKey(int sqlrcurref, int col);

    Returns 1 if the specified column is part of a composite key and 0 otherwise.

  • int sqlrcur_getColumnIsUnsigned(int sqlrcurref, string col);
    int sqlrcur_getColumnIsUnsigned(int sqlrcurref, int col);

    Returns 1 if the specified column is an unsigned number and 0 otherwise.

  • int sqlrcur_getColumnIsZeroFilled(int sqlrcurref, string col);
    int sqlrcur_getColumnIsZeroFilled(int sqlrcurref, int col);

    Returns 1 if the specified column was created with the zero-fill flag and 0 otherwise.

  • int sqlrcur_getColumnIsBinary(int sqlrcurref, string col);
    int sqlrcur_getColumnIsBinary(int sqlrcurref, int col);

    Returns 1 if the specified column contains binary data and 0 otherwise.

  • int sqlrcur_getColumnIsAutoIncrement(int sqlrcurref, string col);
    int sqlrcur_getColumnIsAutoIncrement(int sqlrcurref, int col);

    Returns 1 if the specified column auto-increments and 0 otherwise.

  • int sqlrcur_getLongest(int sqlrcurref, string col)
    int sqlrcur_getLongest(int sqlrcurref, int col)

    Returns the length of the longest field in the specified column.

  • int sqlrcur_getResultSetId(int sqlrcurref)

    Returns the internal ID of this result set. This parameter may be passed to another statement for use in the resumeResultSet() method.

  • void sqlrcur_suspendResultSet(int sqlrcurref)

    Tells the server to leave this result set open when the connection calls suspendSession() so that another connection can connect to it using resumeResultSet() after it calls resumeSession().

  • void sqlrcur_resumeResultSet(int sqlrcurref, int id)

    Resumes a result set previously left open using suspendSession(). Returns 1 on success and 0 on failure.

  • void sqlrcur_resumeCachedResultSet(int sqlrcurref, int id, string filename)

    Resumes a result set previously left open using suspendSession() and continues caching the result set to "filename". Returns 1 on success and 0 on failure.