Database functions

These are PHP-based database wrapper functions designed to interact smoothly with WinBinder objects. They are not part of the core and may be used independently of WinBinder if desired. Database functions start with the prefix wb_. See database support for more information. For other functions, look here.

NOTE: These functions are available for SQLite and MySQL only.

Database functions

db_close_database - Closes the currently open database
db_get_info - Returns database and wrapper version information
db_list_database_tables - Lists the tables that exist in the current database
db_open_database - Opens a database

Table functions

db_create_table - Creates a table in the current database
db_delete_table - Deletes a table
db_list_table_fields - Returns all field names or field attributes from a table
db_rename_table - Renames a table
db_table_exists - Checks for the existence of a table in the current database

Field functions

db_create_field - Creates a field in a table
db_delete_field - Deletes a field in a table
db_edit_field - Edits a field attribute in a table
db_rename_field - Renames a field in a table

Record functions

db_create_record - Creates a record in a table
db_delete_records - Deletes records in a table
db_edit_record - Edits a record in a table
db_get_data - Reads data from a table
db_get_id - Gets the identifier of an indexed record in a table
db_get_next_free_id - Gets the next available id in a table
db_swap_records - Swaps two records in a table 

SQL functions

NOTE: See the Database Support topic for more information on SQL functions.

db_fetch_array - Retrieves an array from a resource
db_free_result - Frees memory allocated by a SQL query
db_escape_string - Escapes a string for use in a SQL query
db_query - Queries the current database using SQL 

See also

Alphabetical list of functions
Functions by category
Auxiliary functions
Database support