Public Method Details |
db_pgsql |
|
public void db_pgsql( [ array $input ] )
|
| |
This constructor does nothing besides calling the parent constructor.
|
| Parameter |
|
| array |
$input |
= >>array()<< |
|
initial properties of the object |
|
| Returns |
void |
|
get_type |
|
public string get_type( )
|
| |
Gets the type of the database.
|
| Returns |
string The type of the database, 'pgsql' in this case. |
|
connect |
|
public boolean connect( )
|
| |
Establishes a connection to the database.
If there has already been made a connection to the database, this function just returns true, and nothing will be changed. This means that it is safe to call this instead of testing $is_connected. If $properties['db_pconnect'] is true, then a persistent connection will be established.
|
| Returns |
boolean Returns true, if a connection were established, false otherwise. |
| See Also |
disconnect() |
|
disconnect |
|
public boolean disconnect( )
|
| |
Disconnects from the database.
If we're already disconnected from the database, this function will just return true.
|
| Returns |
boolean If the disconnec was succesfull then it returns true, otherwise it returns false. |
| See Also |
connect() |
|
select_db |
|
public boolean select_db( )
|
| |
Selects a database.
|
| Returns |
boolean Returns true on success, false otherwise. |
|
query |
|
public boolean query( string $query )
|
| |
Executes a SQL-query.
$result_id is updated as well
|
| Parameter |
|
| string |
$query |
|
|
SQL-statement. |
|
| Returns |
boolean True on success, false otherwise. |
|
fetch_row |
|
public array fetch_row( )
|
| |
Fetches a row as an array from the database.
|
| Returns |
array The next row from the result-set. |
|
fetch_array |
|
public array fetch_array( )
|
| |
Fetches a row as an associative array from the database.
|
| Returns |
array The next row from the result-set, as an associative array. |
|
num_rows |
|
public integer num_rows( )
|
| |
Returns the number of rows in the result-set.
|
| Returns |
integer The number of rows in the current result-set. |
|
insert_metar |
|
public void insert_metar( string $station, string $metar, integer $timestamp )
|
| |
Inserts a METAR into the database.
|
| Parameter |
|
| string |
$station |
|
|
ICAO of the station. |
|
|
|
|
| integer |
$timestamp |
|
|
standard UNIX timestamp. |
|
| Returns |
void |
| See Also |
update_metar() |
|
update_metar |
|
public void update_metar( string $station, string $metar, integer $timestamp )
|
| |
Updates an existing METAR in the database.
|
| Parameter |
|
| string |
$station |
|
|
ICAO of the station. |
|
|
|
|
| integer |
$timestamp |
|
|
standard UNIX timestamp. |
|
| Returns |
void |
| See Also |
insert_metar() |
|
get_metar |
|
public string get_metar( string $station )
|
| |
Gets a METAR form the database.
|
| Parameter |
|
| string |
$station |
|
|
ICAO of the station. |
|
| Returns |
string The raw METAR as an array from the database. |
|