Overview

Namespaces

  • CJPGDK
    • PhpHttpAuth
      • Database
      • Hash
  • PHP

Classes

  • DB
  • MySQL
  • PDODB
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Class MySQL

Provides methods for MySQL integration

CJPGDK\PhpHttpAuth\Database\DB
Extended by CJPGDK\PhpHttpAuth\Database\MySQL
Namespace: CJPGDK\PhpHttpAuth\Database
Package: CJPGDK\PhpHttpAuth
Author: Christian M. Jensen cmj@cjpg.dk
Version: 1.0.0
Since: 1.0.0
Located at src/CJPGDK/PhpHttpAuth/Database/MySQL.php
Methods summary
public
# __construct( $host, $username, $passwd, $dbname = "", $port = 3306, $socket = null )
public boolean
# deleteUser( string $name )

Delete a user from database

Delete a user from database

Parameters

$name

Returns

boolean
public boolean
# saveUser( string $name, string $passwd )

Save or update a user in the database

Save or update a user in the database

Parameters

$name
$passwd

Returns

boolean
public object[]
# getUsers( )

Get user from database

Get user from database

Returns

object[]
public object
# getUser( string $name )

Get user from database

Get user from database

Parameters

$name

Returns

object
public mysqli
# getDb( )

Get the current mysqli object

Get the current mysqli object

Returns

mysqli

Throws

Exception
public
# setConnectionSettings( type $host, type $username, string $passwd, string $dbname = "", integer $port = 3306, string $socket = null )

Set the MySQL connection settings

Set the MySQL connection settings

Parameters

$host
The MySQL hostname or ip
$username
The MySQL user name.
$passwd
the password to use when connection to MySQL
$dbname
[optional] If provided will specify the default database to be used when performing queries.
$port
[optional] Specifies the port number to attempt to connect to the MySQL server.
$socket
[optional] Specifies the socket or named pipe that should be used.
public
# __destruct( )
Methods inherited from CJPGDK\PhpHttpAuth\Database\DB
getConnectionDatabseName(), getConnectionHost(), getConnectionPassword(), getConnectionPort(), getConnectionSocket(), getConnectionUser(), setConnectionDatabseName(), setConnectionHost(), setConnectionPassword(), setConnectionPort(), setConnectionSocket(), setConnectionUser()
Properties summary
protected mysqli $db
#
Properties inherited from CJPGDK\PhpHttpAuth\Database\DB
$dbConnectionSettings, $tableColumns, $usersTableName
PhpHttpAuth API documentation generated by ApiGen