amxmodx/plugins/include/mysql.inc

27 lines
1.1 KiB
PHP
Raw Normal View History

2004-01-31 23:56:22 +03:00
/* MySQL functions
2004-02-08 14:31:54 +03:00
*
* (c) Copyright 2002-2004, dJeyL
2004-02-15 05:29:51 +03:00
* modified by the AMX Mod X Development Team
2004-02-08 14:31:54 +03:00
*
* This file is provided as is (no warranties).
*/
2004-01-31 23:56:22 +03:00
/* Opens connection. If already such exists then that will be used.
2004-02-15 05:29:51 +03:00
* Function returns sql id to use with other sql natives.
* Host can be plain ip or with port seperated with ':' char. */
2004-01-31 23:56:22 +03:00
native mysql_connect(host[],user[],pass[],dbname[],error[],maxlength);
/* Uses an existing connection (sql) to perform a new query (query) (might close previous query if any). */
native mysql_query(sql,query[]);
/* Prepares next row of current query (sql) for read access ; returns the number of the row, 0 at end. */
native mysql_nextrow(sql);
/* Stores specified column (fieldnum) of current query (sql) in (dest) with (maxlength) characters maximum. */
native mysql_getfield(sql,fieldnum,dest[],maxlength);
/* Clears query (sql) and closes connection (if any other plugin doesn't use it). */
native mysql_close(sql);
/* Stores last error of current query/connection (sql) in (dest) with (maxlength) characters maximum. */
2004-02-15 05:29:51 +03:00
native mysql_error(sql,dest[],maxlength);