[Trellis-developers] new database abstraction class
James M. Carlos
james at learning.net
Tue Apr 15 11:10:50 PDT 2008
Great, thanks
James Carlos
The Learning Network
www.learning.net
510.764.1796
james at learning.net
Shaddy Zeineddine wrote:
> = TrellisDB =
>
> == Public Methods ==
>
> __construct - define the host, or write host
> read_hosts - define read hosts
> connect - connect to host(s)
> close - disconnect from host(s)
> select_db - change database (cannot use "USE")
>
> select_rows - select multiple rows as an array of arrays
> select_row - select one row as an array
> select_column - select multiple rows of 1 or 2 fields as an array
> select_field - select a single value
> select_prepared - create a statement object for use in selects
> select - perform a select returning the result object
>
> next_row - grabs the next row from a result object
> next_field - grabs the first field of the next row from a result
>
> free - deprecated (use $result->close())
>
> exists - checks if at least one row matches, returns bool
> count - returns the count of the rows
>
> affect - used to perform queries that modify data
> affect_prepared - create a statement object for affect queries
>
> last_insert_id - grab the id created on the last insert
>
> start_transaction - begins a set of queries that can be rolled back
> rollback - roll back the previous queries and end transaction
> commit - apply the queries and end transaction
>
> report - returns a string with total queries and time
>
> error - returns the last mysqli error
>
> escape_string - escapes a string properly (will be linked to
> escape_string function)
>
>
> == Public Properties ==
>
> affected_rows - numbers of rows affected by last affect query
> selected_rows - number of rows selected by last select query
>
> query_count - number of queries made
> last_query_time - time it took to perform the last query
> total_query_time - total time of all queries
> _______________________________________________
> Trellis-developers mailing list
> Trellis-developers at trellis.learning.net
> http://trellis.learning.net/mailman/listinfo/trellis-developers
>
More information about the Trellis-developers
mailing list