USING
You can use the module by loading it in your PHP script and calling SQL Relay functions.
For example:
dl("sql_relay.so");$con=sqlrcon_alloc("adasz",9000,"","user1","password1",0,1);$cur=sqlrcur_alloc($con);sqlrcur_sendQuery($cur,"select table_name from user_tables");sqlrcon_endSession($con);for ($i=0; $i<sqlrcur_rowCount($cur); $i++){ printf("%s\n",sqlrcur_getField($cur,$i,"table_name"));}sqlrcur_free($cur);sqlrcon_free($con);
An alternative to running dl(sql_relay.so) is to put a line like:
extension=sql_relay.soIn your php.ini file. Doing this will improve performance as the library isn't loaded and unloaded each time a script runs, but only once when the web-server is started.
FUNCTIONS 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_setTimeout(int timeoutsec, int timeoutusec)
Sets the server connect timeout in seconds and milliseconds. Setting either parameter to -1 disables the timeout.
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. Note: the value returned by this function is only valid after a call to sqlrcur_suspendSession().
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. Note: the value returned by this function is only valid after a call to sqlrcur_suspendSession().
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: oracle8, postgresql, mysql, etc.
string sqlrcon_dbVersion(int sqlrconref)
Returns the version of the database
string sqlrcon_serverVersion(int sqlrconref)
Returns the version of the SQL Relay server software
string sqlrcon_clientVersion(int sqlrconref)
Returns the version of the SQL Relay client software
string sqlrcon_bindFormat(int sqlrconref)
Returns a string representing the format of the bind variables used in the db.
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 function 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 functions.
int sqlrcur_sendQuery(int sqlrcurref, string query)
Sends "query" and gets a return set. Returns TRUE on success and FALSE on failure.
int sqlrcur_sendQueryWithLength(int sqlrcurref, string query, int length)
Sends "query" with length "length" and gets a result set. This function must be used if the query contains binary data.
int sqlrcur_sendFileQuery(int sqlrcurref, string path, string filename)
Sends the query in file "path"/"filename" and gets a return set. Returns TRUE on success and FALSE on failure.
If you need to use substitution or bind variables, in your queries use the following functions. 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 function 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. Returns true if the substitution succeeded or false if the type of the data passed in wasn't a string, long or double or if precision and scale weren't passed in for a double.
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. Returns true if the bind succeeded or false if the type of the data passed in wasn't a string, long or double or if precision and scale weren't passed in for a double.
void sqlrcur_defineOutputBindString(int sqlrcurref, string variable, int length)
Define a string output bind variable. "length" bytes will be reserved to store the value.
void sqlrcur_defineOutputBindInteger(int sqlrcurref, string variable)
Define an integer output bind variable.
void sqlrcur_defineOutputBindDouble(int sqlrcurref, string variable)
Define a double precision floating point output bind variable.
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.
void sqlrcur_validBind(int sqlrcurref, string variable)
Returns true if "variable" was a valid bind variable of 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_getOutputBindString(int sqlrcurref, string variable)
Get the value stored in a previously defined output bind variable.
int sqlrcur_getOutputBindBlob(int sqlrcurref, string variable)
Get the value stored in a previously defined output bind variable.
int sqlrcur_getOutputBindClob(int sqlrcurref, string variable)
Get the value stored in a previously defined output bind variable.
int sqlrcur_getOutputBindInteger(int sqlrcurref, string variable)
Get the value stored in a previously defined output bind variable.
int sqlrcur_getOutputBindDouble(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 function 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 function 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.
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().
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() function. Note: the value returned by this function is only valid after a call to sqlrcur_suspendResultSet().
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.
AUTHOR Adam Kropielnicki
adasz@wp.pl

PHP 유형은 코드 품질과 가독성을 향상시키기위한 프롬프트입니다. 1) 스칼라 유형 팁 : PHP7.0이므로 int, float 등과 같은 기능 매개 변수에 기본 데이터 유형을 지정할 수 있습니다. 2) 반환 유형 프롬프트 : 기능 반환 값 유형의 일관성을 확인하십시오. 3) Union 유형 프롬프트 : PHP8.0이므로 기능 매개 변수 또는 반환 값에 여러 유형을 지정할 수 있습니다. 4) Nullable 유형 프롬프트 : NULL 값을 포함하고 널 값을 반환 할 수있는 기능을 포함 할 수 있습니다.

PHP에서는 클론 키워드를 사용하여 객체 사본을 만들고 \ _ \ _ Clone Magic 메소드를 통해 클로닝 동작을 사용자 정의하십시오. 1. 복제 키워드를 사용하여 얕은 사본을 만들어 객체의 속성을 복제하지만 객체의 속성은 아닙니다. 2. \ _ \ _ 클론 방법은 얕은 복사 문제를 피하기 위해 중첩 된 물체를 깊이 복사 할 수 있습니다. 3. 복제의 순환 참조 및 성능 문제를 피하고 클로닝 작업을 최적화하여 효율성을 향상시키기 위해주의를 기울이십시오.

PHP는 웹 개발 및 컨텐츠 관리 시스템에 적합하며 Python은 데이터 과학, 기계 학습 및 자동화 스크립트에 적합합니다. 1.PHP는 빠르고 확장 가능한 웹 사이트 및 응용 프로그램을 구축하는 데 잘 작동하며 WordPress와 같은 CMS에서 일반적으로 사용됩니다. 2. Python은 Numpy 및 Tensorflow와 같은 풍부한 라이브러리를 통해 데이터 과학 및 기계 학습 분야에서 뛰어난 공연을했습니다.

HTTP 캐시 헤더의 주요 플레이어에는 캐시 제어, ETAG 및 최종 수정이 포함됩니다. 1. 캐시 제어는 캐싱 정책을 제어하는 데 사용됩니다. 예 : 캐시 제어 : Max-AGE = 3600, 공개. 2. ETAG는 고유 식별자를 통해 리소스 변경을 확인합니다. 예 : ETAG : "686897696A7C876B7E". 3. Last-modified는 리소스의 마지막 수정 시간을 나타냅니다. 예 : 마지막으로 변형 : Wed, 21oct201507 : 28 : 00GMT.

PHP에서 Password_hash 및 Password_Verify 기능을 사용하여 보안 비밀번호 해싱을 구현해야하며 MD5 또는 SHA1을 사용해서는 안됩니다. 1) Password_hash는 보안을 향상시키기 위해 소금 값이 포함 된 해시를 생성합니다. 2) Password_verify 암호를 확인하고 해시 값을 비교하여 보안을 보장합니다. 3) MD5 및 SHA1은 취약하고 소금 값이 부족하며 현대 암호 보안에는 적합하지 않습니다.

PHP는 동적 웹 개발 및 서버 측 응용 프로그램에 사용되는 서버 측 스크립팅 언어입니다. 1.PHP는 편집이 필요하지 않으며 빠른 발전에 적합한 해석 된 언어입니다. 2. PHP 코드는 HTML에 포함되어 웹 페이지를 쉽게 개발할 수 있습니다. 3. PHP는 서버 측 로직을 처리하고 HTML 출력을 생성하며 사용자 상호 작용 및 데이터 처리를 지원합니다. 4. PHP는 데이터베이스와 상호 작용하고 프로세스 양식 제출 및 서버 측 작업을 실행할 수 있습니다.

PHP는 지난 수십 년 동안 네트워크를 형성했으며 웹 개발에서 계속 중요한 역할을 할 것입니다. 1) PHP는 1994 년에 시작되었으며 MySQL과의 원활한 통합으로 인해 개발자에게 최초의 선택이되었습니다. 2) 핵심 기능에는 동적 컨텐츠 생성 및 데이터베이스와의 통합이 포함되며 웹 사이트를 실시간으로 업데이트하고 맞춤형 방식으로 표시 할 수 있습니다. 3) PHP의 광범위한 응용 및 생태계는 장기적인 영향을 미쳤지 만 버전 업데이트 및 보안 문제에 직면 해 있습니다. 4) PHP7의 출시와 같은 최근 몇 년간의 성능 향상을 통해 현대 언어와 경쟁 할 수 있습니다. 5) 앞으로 PHP는 컨테이너화 및 마이크로 서비스와 같은 새로운 도전을 다루어야하지만 유연성과 활발한 커뮤니티로 인해 적응력이 있습니다.

PHP의 핵심 이점에는 학습 용이성, 강력한 웹 개발 지원, 풍부한 라이브러리 및 프레임 워크, 고성능 및 확장 성, 크로스 플랫폼 호환성 및 비용 효율성이 포함됩니다. 1) 배우고 사용하기 쉽고 초보자에게 적합합니다. 2) 웹 서버와 우수한 통합 및 여러 데이터베이스를 지원합니다. 3) Laravel과 같은 강력한 프레임 워크가 있습니다. 4) 최적화를 통해 고성능을 달성 할 수 있습니다. 5) 여러 운영 체제 지원; 6) 개발 비용을 줄이기위한 오픈 소스.


핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

SecList
SecLists는 최고의 보안 테스터의 동반자입니다. 보안 평가 시 자주 사용되는 다양한 유형의 목록을 한 곳에 모아 놓은 것입니다. SecLists는 보안 테스터에게 필요할 수 있는 모든 목록을 편리하게 제공하여 보안 테스트를 더욱 효율적이고 생산적으로 만드는 데 도움이 됩니다. 목록 유형에는 사용자 이름, 비밀번호, URL, 퍼징 페이로드, 민감한 데이터 패턴, 웹 셸 등이 포함됩니다. 테스터는 이 저장소를 새로운 테스트 시스템으로 간단히 가져올 수 있으며 필요한 모든 유형의 목록에 액세스할 수 있습니다.

안전한 시험 브라우저
안전한 시험 브라우저는 온라인 시험을 안전하게 치르기 위한 보안 브라우저 환경입니다. 이 소프트웨어는 모든 컴퓨터를 안전한 워크스테이션으로 바꿔줍니다. 이는 모든 유틸리티에 대한 액세스를 제어하고 학생들이 승인되지 않은 리소스를 사용하는 것을 방지합니다.

Atom Editor Mac 버전 다운로드
가장 인기 있는 오픈 소스 편집기

MinGW - Windows용 미니멀리스트 GNU
이 프로젝트는 osdn.net/projects/mingw로 마이그레이션되는 중입니다. 계속해서 그곳에서 우리를 팔로우할 수 있습니다. MinGW: GCC(GNU Compiler Collection)의 기본 Windows 포트로, 기본 Windows 애플리케이션을 구축하기 위한 무료 배포 가능 가져오기 라이브러리 및 헤더 파일로 C99 기능을 지원하는 MSVC 런타임에 대한 확장이 포함되어 있습니다. 모든 MinGW 소프트웨어는 64비트 Windows 플랫폼에서 실행될 수 있습니다.

드림위버 CS6
시각적 웹 개발 도구
