$myArray = $db->RecordsArray(); // --- List all of the tables in the database ----------------------- $tables = $db->GetTables(); foreach ($tables as $table) { echo $table . "<br />\n"; } // --- Show the columns (field names) in a table -------------------- $columns = $db->GetColumnNames("test"); foreach ($columns as $column) { echo $column . "<br />\n"; } // --- Find a column (field) type and length ------------------------ echo "Type: " . $db->GetColumnDataType("Color", "Test") . "<br />\n"; echo "Length: " . $db->GetColumnLength("Color", "Test") . "<br />\n"; // --- Get a column's ordinal position (the column number) ---------- echo $db->GetColumnID("Age", "Test") . "<br />\n"; // --- Check for errors --------------------------------------------- if ($db->Error()) { echo "<h3>" . $db->Error() . "</h3>\n"; } else { echo "<p>There were no errors</p>\n"; } // --- Format some values ready for SQL ----------------------------- // You do not have to create the object to use these. Simply include // the class in your PHP file. These are called "Static" methods. echo "<br /><br />\n\n"; echo MySQL::SQLValue("Let's format some text") . "<br />\n"; echo MySQL::SQLValue(date("m/d/Y"), MySQL::SQLVALUE_DATE) . "<br />\n"; echo MySQL::SQLValue(123, MySQL::SQLVALUE_NUMBER) . "<br />\n"; // --- Format some values ready for SQL based on a boolean value ---- echo MySQL::SQLBooleanValue(false, "1", "0", MySQL::SQLVALUE_NUMBER);