mysqlInterface Class Reference
List of all members.
Detailed Description
Definition at line 3 of file mysqlInterface.php.
Constructor & Destructor Documentation
| mysqlInterface::__construct |
( |
|
) |
|
Member Function Documentation
| mysqlInterface::connect |
( |
$ |
host, |
|
|
$ |
user, |
|
|
$ |
pass, |
|
|
$ |
db | |
|
) |
| | |
Definition at line 11 of file mysqlInterface.php.
00011 {
00012 if ($this->resource = @mysql_connect( $host, $user, $pass ) AND mysql_select_db($db)) return $this->resource;
00013 return null;
00014 }
| mysqlInterface::connectError |
( |
|
) |
|
| mysqlInterface::setCharset |
( |
$ |
charset |
) |
|
Definition at line 20 of file mysqlInterface.php.
00020 {
00021 mysql_query ("SET CHARSET '$charset'");
00022 }
| mysqlInterface::query |
( |
$ |
sql |
) |
|
| mysqlInterface::errno |
( |
|
) |
|
| mysqlInterface::error |
( |
|
) |
|
| mysqlInterface::getEscaped |
( |
$ |
text |
) |
|
Definition at line 37 of file mysqlInterface.php.
00037 {
00038 return mysql_real_escape_string ((string) $text);
00039 }
| mysqlInterface::getNumRows |
( |
$ |
cur = null |
) |
|
Definition at line 41 of file mysqlInterface.php.
00041 {
00042 return mysql_num_rows( $cur ? $cur : $this->cursor );
00043 }
| mysqlInterface::getAffectedRows |
( |
|
) |
|
Definition at line 45 of file mysqlInterface.php.
00045 {
00046 return mysql_affected_rows();
00047 }
| mysqlInterface::insertid |
( |
|
) |
|
Definition at line 49 of file mysqlInterface.php.
00049 {
00050 return mysql_insert_id($this->resource);
00051 }
| mysqlInterface::getVersion |
( |
|
) |
|
Definition at line 53 of file mysqlInterface.php.
00053 {
00054 return mysql_get_server_info();
00055 }
| mysqlInterface::getFetchFunc |
( |
|
) |
|
| mysqlInterface::freeResultSet |
( |
$ |
cur = null |
) |
|
Definition at line 61 of file mysqlInterface.php.
00061 {
00062 mysql_free_result($cur ? $cur : $this->cursor);
00063 }
| mysqlInterface::multiQuery |
( |
$ |
sql |
) |
|
Definition at line 65 of file mysqlInterface.php.
00065 {
00066 $this->queries = explode (';', $sql);
00067 $this->qcursor = 0;
00068 return count($this->queries);
00069 }
| mysqlInterface::storeResult |
( |
|
) |
|
Definition at line 71 of file mysqlInterface.php.
References query().
00071 {
00072 if (!empty($this->queries[$this->qcursor])) return $this->query ($this->queries[$this->qcursor]);
00073 return null;
00074 }
| mysqlInterface::nextResult |
( |
|
) |
|
Definition at line 76 of file mysqlInterface.php.
00076 {
00077 $this->qcursor++;
00078 return isset($this->queries[$this->qcursor]);
00079 }
Member Data Documentation
mysqlInterface::$resource = null [private] |
mysqlInterface::$queries = array() [private] |
mysqlInterface::$qcursor = 0 [private] |
The documentation for this class was generated from the following file: